Skip to content

KKT refactorization and solve are level-bound after the regime-A split: 54–59 launches per refactorization, 62–85 per solve, regime-B fronts on one or two blocks #82

Description

@michel2323

Found while working on: experiment 0 of PERFORMANCE.md (PR #81)

What: PR #81 splits regime-A subtrees by flops. After that, the pglib KKT dumps no longer run on one workgroup, but their refactorization and solve are bound by the number of tree levels. The profile comes from bench/profile_phases.jl on an RTX 4080 and is in bench/profile/phase_split.md on that branch.

matrix refactorization kernels solve kernels cuDSS refactorization / solve
case1354 condensed, Cholesky 2.9 ms 59 1.1 ms 62 0.59 / 0.27 ms
case1354 condensed, LDLᵀ 9.7 ms 59 1.2 ms 63 0.68 / 0.36 ms
case1354 K2, LDLᵀ 7.2 ms 58 1.5 ms 85 0.82 / 0.42 ms

On these rows, the longest kernel takes under 15% of GPU busy time. Busy time still equals wall time, so the host is not the limit. The cost is one launch per schedule level and step. Each regime-B launch (factorize_fronts_b! / front_ldlt_kernel, and the per-level sweep kernels in src/solve/sweeps.jl) has few fronts, often one or two thread blocks. The remaining gap to cuDSS on case1354 is 5× (Cholesky) and 9–14× (LDLᵀ) for refactorization, and 3–6× for the solve.

Why it is out of scope: PR #81 only fixes the regime-A selection. The work belongs to T25 (performance pass: "CUDA sync-free forward sweep, CUDA graph capture of refactorize+solve, level merging") and is not blocking. It is experiments 5 and 6 of PERFORMANCE.md. The LDLᵀ rows also contain the one-front-per-workgroup cost of #75.

Suggested fix or plan change: three options.

  • Level merging: one persistent kernel over a window of levels, with per-front dependency counters instead of one launch per level.
  • Graph capture: capture refactorization and solve in one CUDA graph, replayed through a cached exec rather than @captured.
  • Wider per-level launches: more than one block per small front, or several fronts per block, for the sweeps.

Measure each with bench/profile_phases.jl --only=kkt_pglib_opf_case1354_pegase_k2_1,....

Activity

  1. added
    found-by-agentOpened by an implementing agent for an out-of-scope finding
    performanceSpeed or memory of the numeric and solve phases; tracked in PERFORMANCE.md
    on Oct 5, 2026
  2. changed the title [-]KKT refactorization and solve are level-bound after the regime-A split: 30–60 launches per refactorization, 35–85 per solve, regime-B fronts on one or two blocks[/-] [+]KKT refactorization and solve are level-bound after the regime-A split: 54–59 launches per refactorization, 62–85 per solve, regime-B fronts on one or two blocks[/+] on Oct 5, 2026
  3. added
    triagedOwner has looked at this found-by-agent issue; it no longer holds the task chain
    on Oct 5, 2026
  4. added 2 commits that reference this issue on Oct 9, 2026
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

    found-by-agentOpened by an implementing agent for an out-of-scope findingperformanceSpeed or memory of the numeric and solve phases; tracked in PERFORMANCE.mdtriagedOwner has looked at this found-by-agent issue; it no longer holds the task chain

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions