Skip to content

oneAPI: host allocation of the unpivoted fused cycle exceeds its budget after the diagonal-pivoting change (PR #204) #205

Open

Description

@michel2323

Found while working on: no task; stage 2 of #167 (PR #204, diagonal pivoting in the fused factorization).

What: On Aurora (oneAPI, Max 1550, LTS stack) PR #204 fails one existing check, the host-allocation budget of one fused refactorize! plus solve! cycle, in a testset that does not pivot:

Error in testset "S", ir_n_steps with matching and pivot replacement: Float32
test/test_fused.jl:463   bytes <= fused_cycle_alloc_budget(backend)
Evaluated: 101384 <= 98304
... Float64:
Evaluated: 101624 <= 98304
  • fused_cycle_allocated and fused_cycle_alloc_budget are in test/utils.jl. The budget is 64 KiB on CUDA and AMDGPU and 96 KiB on oneAPI, where each KernelAbstractions launch and each fill!/copyto! of a view allocates 352–368 B on the host (about 256 B and 240 B on CUDA).
  • The testset uses pivot_type = 'N', matching_alg = "algo5" and ir_n_steps = 2, so its cycle has the most solves and sits closest to the budget. The other fused cycles pass on Aurora.
  • Aurora passes on main after Fused solve: in-front pivot orders and 2×2 blocks of a pivoted LDLᵀ factor (refs #167, stage 1) #203 (stage 1), so the two stage 2 commits (8e59d4e in src/fused.jl, 12090c9 in src/kkt.jl) raised the host allocation of the unpivoted cycle. By how much is not known: the value before stage 2 was under the budget but was not recorded. The same check passes on CUDA and AMDGPU, whose budget has more headroom.
  • The cause is not identified. Candidates in the stage 2 diff of src/fused.jl: launches, fill!/copyto! or host reads added per refactorize!/solve! (for instance set_pivoted! at each factorization, the pivot plan capturing pivot_type/pivot_threshold/pivot_sign/pivot_epsilon, the npivots count), a Val built from a runtime flag at a call site (a dynamic dispatch per call), or longer kernel argument lists (piv and the Val added to the fused factorization and solve kernels).

Why it is out of scope: none in TASKS.md. It needs oneAPI hardware: the per-launch allocation differs by backend, so a CUDA measurement gives the number of launches but not the Aurora bytes. It does not block a task; it keeps the ALCF / LTS stack (Aurora) status of #204 red.

Suggested fix or plan change: on Aurora,

  1. Measure fused_cycle_allocated for that testset's configuration on main and on maint/fused-diagonal-pivoting, in Float32 and Float64, and the number of launches and fill!s per cycle on both, to get the delta and where it comes from.
  2. If the unpivoted cycle does work it does not need (a launch, a fill, a host read, a dynamic dispatch), remove it so the cycle allocates what it did before stage 2, with pivot_type = 'D' still correct.
  3. If the increase is inherent (the same launches with more arguments), state the per-launch cost and the measured range, and propose the oneAPI value of fused_cycle_alloc_budget with its docstring updated. Changing the budget is the owner's decision, since it loosens an existing check.

Aurora job log of the failure: the alcf-report run of pipeline 75926 (GitHub Actions run 43759157679).

Activity

  1. added
    found-by-agent
    testing
    fused
    oneapi
    on Nov 16, 2026
  2. michel2323 commented on Nov 17, 2026

    @michel2323
    MemberAuthor

    Measured on Aurora (Max 1550, LTS stack, the environment of .gitlab-ci.yml, oneAPI.jl 2.10.0, KernelAbstractions 0.10.7). The probe reproduces the CI values exactly (101384 / 101624 B).

    Result. The unpivoted cycle does no additional launch, fill!, copyto! or host read after stage 2. The increase is the host cost of one launch, the fused factorization kernel (fp.kfact in refact_fused_launches!, once per cycle), whose argument list went from 50 to 56.

    commit cycle, Float32 cycle, Float64 refactorization (Float32 / Float64) solve
    6f8c6b6 (before #203) 90152 92600 48440 / 50888 41728
    69958e2 (main, after #203) 92232 94680 48440 / 50888 43808
    12090c9 (#204) 101384 101624 57592 / 57832 43808

    Bytes of the failing testset's cycle (ir_n_steps = 2: three solves). On all three commits a refactorization is 10 kernel launches and 7 copyto!, the solve 17 launches and 6 copyto!.

    Why one launch costs 42 KB. The statement in the issue and in the old docstring that oneAPI.jl allocates 352–368 B per launch holds only up to 30 kernel arguments. From 31 arguments on (32 with the KernelAbstractions context) the launch converts its arguments through Base's map for long tuples, which is not inferred, and allocates about 1 KB per argument:

    array arguments 1 8 24 30 31 40 50 56
    B per launch (KernelAbstractions kernel) 352 960 2576 2768 16224 24704 36344 42920

    Filed upstream as JuliaGPU/oneAPI.jl#769 (the case JuliaGPU/oneAPI.jl#687 set aside).

    The other fused cycles on #204 allocate 79–82 KB (the matching testset 80.1–80.3 KB, the allowance testset 79.2–81.6 KB), about 9 KB (Float32) / 7 KB (Float64) more than on main. Only the cycle with three solves passes 96 KiB.

    What was done. Point 3 of the issue: fused_cycle_alloc_budget(::oneAPIBackend) is 112 KiB in #204 (dab6205), with the docstring stating the above. The CUDA and AMDGPU budget is unchanged.

    Not done, possible later.

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-agentfusedoneapitesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions