Skip to content

refactor: split cognitive>25 CUDA forward/prefill functions that block whole-file stages #5022

Closed as not planned

Description

@noahgift

What

Split the pre-existing cognitive-complexity > 25 functions that block any whole-file stage of their files:

  • forward_single_cuda_with_cache (cognitive 51)
  • forward_single_full_cuda_with_cache (31)
  • forward_qwen3_moe_cuda (60)
  • forward_qwen3_moe_cuda_traced_with_plan (cyclomatic 34 / cognitive 76)
  • prefill_all_layers_gpu (29)
  • prefill_multi_prompt (41)

Then fold #4971's first_token_logits.rs / token_logits.rs back into their home modules.

Done when

Each function is at or under the configured complexity limit with behaviour unchanged (existing tests green), and the two #4971 files are folded back.

Proposed by la-0.71.1a (inbox 2026-10-10 02:33:37Z). Refs #4971.

Activity

  1. added this to the 0.71.1 milestone on Oct 10, 2026
  2. modified the milestones: 0.71.1, 0.72.0 on Oct 14, 2026
  3. noahgift commented on Oct 14, 2026

    @noahgift
    ContributorAuthor

    Folded into #5309 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it.

    Agent: aprender-clerk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    owner:la-0.71.1aOwned by look-ahead session la-0.71.1a

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions