Skip to content

device verification: the restored dynamic-workload launches have not run on gfx1151 (pinned by #3481) #3483

Done

Description

@bong-water-water-bong

The engine pin bump #3481 (llama.cpp 6164e5ba, fork #507) restores the dynamic-workload specialization that
f2099e9b7 dropped — and that turns per-dispatch dynamic launches live on the box for the first time since that
revert
, with host-tier evidence only. The box was queue-deep under other lanes' tickets for hours, so nothing on
gfx1151 has run this yet.

What must be verified on strixhalo (one box-hold both ticket, the HRX add-on build):

  1. The four re-pointed device rows against their CPU reference: rmsnorm.default, rmsnorm.hidden3840.tokens18,
    scheduled.scale_rmsnorm, dynamic_generic_ops.cpu_reference (concat_dim0 inside that row stays Exact).
  2. One graph reusing a dynamic executable across two token counts in a single run — the point of the change is one
    cached program evaluated per dispatch, so a run that does two prompt lengths must show one compile and identical
    numerics.
  3. #3382's own measurement: compile count and TTFT over a prompt-length sweep (dynamic on vs at e0e7c8d3), so the
    restore is recorded as a measured effect rather than a regression fix.
  4. hrx-ops-test / test-hrx-ops full device tier must stay at 0 failures, and the engine's hrx-ops-test rows for
    the packed/mixed-layout coverage (hrx-ops-test: the host-weight packed / mixed-layout path has no coverage: its four cases' graphs now read the weight as stored #3389) and the attention-output next-q8 plan (hrx: the fused Qwen attention-output next-q8 matcher (qwen3_moe_dense_linear_q4k_q8_1_x4_next_q8) is selected in no configuration #3380) should be recorded from the
    same run.

Why this is its own issue

#3382 is closed on the code fix + host control (three controls: tags-only reverted, cache-key-only restored, whole
tree at the pre-fix sha does not build). This issue exists so the device half is not lost: a per-dispatch launch
geometry bug would show up here, not in CI, and the change's blast radius is every matcher already tagging
Dynamic (get_rows, rope_set_rows). Record the run's summary line and the compile counts in a comment here, then
close.

Refs #3382, #3389, #3380; pinned by #3481.

Activity

  1. bong-water-water-bong commented on Nov 24, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Device-verification attempt on the pinned build (blocked: strixhalo GPU wedged; no device row ran)

    Lane lane-dv-6164, 24 Nov. Built the add-on and no-add-on variants on ryzen from engine main ad10a171 (llama.cpp 6164e5ba, gpu-kernels 87bdf514) and shipped them to /data/dev/cl-hrxtest/tests-6164a (add-on) / tests-6164n. No device case from this issue ran: the HRX backend does not initialise on the box, so every device case is skipped. Nothing here verifies or refutes the restored dynamic launches.

    Configure/build (add-on; the no-add-on build is the same without GGML_HRX_HIP_ADDON_DIR), in third_party/llama.cpp of a throwaway worktree at origin/main:

    cmake -B build-hrx -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-16 -DCMAKE_CXX_COMPILER=g++-16 \
      -DONEBIT_HRX=ON -DGGML_HRX=ON -DLLAMA_BUILD_TESTS=ON -DGGML_HRX_KERNEL_CORPUS_SOURCE_FORMAT=text \
      -DCMAKE_PREFIX_PATH=/home/bcloud/work/hrx-system/build/hrx-install \
      -DGGML_HRX_HIP_COMPILER=/home/bcloud/sdk-gfx1201-devel/llvm/bin/amdclang++ \
      -DGGML_HRX_HIP_TARGETS=gfx1151 \
      -DGGML_HRX_HIP_ADDON_DIR=/home/bcloud/.cache/scratch-dv/gpu-kernels/addons/hip-hrx
    cmake --build build-hrx --target hrx-ops-test test-hrx-ops -j 6
    

    Submodules at the pin (llama.cpp 6164e5ba, hrx-system 7f423692); the add-on checkout is gpu-kernels 87bdf514 and the configure reports 62 add-on kernels.

    Runs (one box-hold both ticket, 10:35:11Z, each command timeout 900, env HRX_ALLOW_NO_SVM=1 HSA_USERPTR_FOR_PAGED_MEM=0 HSA_USE_SVM=0 IREE_HAL_AMDGPU_LIBHSA_PATH=/opt/rocm-therock/lib/libhsa-runtime64.so.1, LD_LIBRARY_PATH=<tests dir>:/data/dev/cl-hrxtest/pkg/hrx/llama/bin):

    run rc summary line
    add-on ./test-hrx-ops (HRX_OPS_TEST_OUTPUT=failed) 0 test-hrx-ops summary: 2 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 2 total, 87 ms
    add-on ./hrx-ops-test --hrx-test-output failed 0 HRX test summary: 15 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 15 total, 209 ms
    no-add-on ./hrx-ops-test --hrx-test-output failed (run A) 0 HRX test summary: 15 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 15 total, 56 ms
    no-add-on same (run B) 0 15 passed, 0 failed, 15 total, 57 ms
    add-on four rows + GGML_HRX_TRACE_COMPILE=1 77 no summary (device skip)

    Those 15/2 totals are the host-tier cases only — this build lists 413 cases, so ~398 device cases were skipped at init. The backend line, same on both variants:

    hrx_gpu_initialize(0) failed: ... libhsa.c:499: RESOURCE_EXHAUSTED; [hsa_init] HSA_STATUS_ERROR_OUT_OF_RESOURCES
    

    So, per the issue's checklist:

    1. The four re-pointed rows (rmsnorm.default, rmsnorm.hidden3840.tokens18, scheduled.scale_rmsnorm, dynamic_generic_ops.cpu_reference) did not execute — no PASS/FAIL to record. (dynamic_generic_ops.cpu_reference etc. are device cases; the trace run returned 77.)
    2. "One dynamic executable reused across two token counts in a single run": not shown by the suite. The suite only asserts the classification (WorkloadSpecialization::Dynamic for ggml_rmsnorm_f32 / ggml_scale_f32 / unary+copy in dynamic_generic_ops); the rmsnorm.default (tokens=4) and rmsnorm.hidden3840.tokens18 rows are separate cases in separate worker processes with a fresh backend each, so they cannot demonstrate one cached program evaluated at two token counts. What is missing is a run that keeps one backend and prints the kernel-executable cache's per-graph compile count at two token counts. I staged such a probe (/data/dev/cl-hrxtest/tests-6164a/dv-two-count, source ~/.cache/scratch-dv/two-count.cpp: one HRX backend, one ggml_rms_norm graph at 4 and at 18 tokens, values checked against a CPU reference, GGML_HRX_TRACE_COMPILE=1 so graph_end carries compilations), but it also cannot initialise the backend on the wedged box ("probe: no HRX backend**", rc=1). It needs the rerun, not a new build.
    3. hrx: rmsnorm / scale / unary / copy / concat lost their Dynamic (any-token-count) specialization in fork f2099e9b7 #3382's compile-count/TTFT prompt-length sweep: not run (same blocker).
    4. hrx-ops-test / test-hrx-ops "0 failures" is not established by these runs: only host cases ran.

    Blocker (pre-existing, not this lane's runs): dmesg shows page faults from loom-serve pid 36650, then MES failed to respond ... MES might be in unrecoverable state, remove_all_kfd_queues_mes: Failed to remove queue 0, a MODE2 reset at 10:31:46Z (GPU reset(3)) ending [drm] device wedged; an earlier reset(2) was at 10:27:01Z. Since then every hsa_init fails with OUT_OF_RESOURCES. One sysfs amdgpu reset at 10:36:05Z logged resetting/reset done but did not restore KFD, and this kernel has no debugfs amdgpu_gpu_recover node. A host reboot is required before this issue's device half can be measured.

    Logs: /data/dev/cl-hrxtest/runs/dv6164-addon-hrx-ops-test.log, dv6164-addon-test-hrx-ops.log, dv6164-addon-trace-rows.log, dv6164-noaddon-hrx-ops-test*.log, status dv6164.status.

    Caveat for whoever reruns: the binaries were linked against the pre-existing /home/bcloud/work/hrx-system/build/hrx-install prefix (the fork-lane recipe), which was built 13 Oct from hrx-system a5b9a7e, not from the 7f423692 pin in the worktree. That is the same prefix the fork lanes used, but if the rerun wants the pin exactly, build hrx-system from the pinned submodule and point CMAKE_PREFIX_PATH there.

  2. bong-water-water-bong commented on Nov 24, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Device verification on gfx1151 (lane lane-dv2, 24 Nov): four rows PASS, one compile across two token counts — but the full device tier is not at 0 failures

    Build: engine main ad10a171, llama.cpp 6164e5ba, gpu-kernels 87bdf514; add-on tests-6164a + no-add-on tests-6164n. One box-hold both ticket, device work as root — this box has no logind and /dev/kfd is 0600 root:root, so non-root runs fail with hsa_init RESOURCE_EXHAUSTED (details in #3397). The staged dirs' stale Oct-13 libhrx/libloomc were pointed at the staged package runtime pkg/hrx/llama/bin (which carries the pin's HRX_ALLOW_NO_SVM gate); the Oct-13 copies are kept as *.stale-oct13. No rebuild. Runner: sh /data/dev/cl-hrxtest/run-dv6164.sh, env HRX_ALLOW_NO_SVM=1 HSA_USERPTR_FOR_PAGED_MEM=0 HSA_USE_SVM=0 IREE_HAL_AMDGPU_LIBHSA_PATH=/opt/rocm-therock/lib/libhsa-runtime64.so.1; 11:22:39–11:41:58Z, no GPU reset during it.

    1. The four re-pointed rows: PASS in both builds

    row add-on no-add-on (runs A / B) dedicated trace run
    rmsnorm.default PASS PASS / PASS PASS
    rmsnorm.hidden3840.tokens18 PASS PASS / PASS PASS
    scheduled.scale_rmsnorm PASS PASS / PASS PASS
    dynamic_generic_ops.cpu_reference PASS PASS / PASS PASS

    GGML_HRX_TRACE_COMPILE=1 four-row run: HRX test summary: 4 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 4 total, 120563 ms, rc=0. The rmsnorm compile_request carries "workload_specialization":"dynamic".

    2. One dynamic program across two token counts: PASS

    dv-two-count (add-on, GGML_HRX_TRACE_COMPILE=1, rc=0):

    probe: graph tokens=4 status=0 max_abs_diff=1.1920929e-07 value=PASS
    probe: graph tokens=18 status=0 max_abs_diff=2.38418579e-07 value=PASS
    probe: PASS
    

    Trace for that process: one compile_request (compilation_id:3, ggml_rmsnorm_f32, "workload_specialization":"dynamic", integer_parameters.token_count=4), compile_begin/compile_end 4.79 ms, then a second graph_begin→graph_end with no compile_request — one cached program evaluated at both token counts, numerics matching CPU to ≤2.4e-7. (The graph_end events' own "compilations" field printed 0 for both graphs; the compile appears as the compile_request above.)

    4. Full device tier: NOT 0 failures

    add-on   test-hrx-ops: 295 passed, 0 failed, 0 known-fail, 295 total   rc=0
    add-on   hrx-ops-test: 407 passed, 3 failed, 1 known-fail, 411 total  rc=1
    no-addon hrx-ops-test: 401 passed, 9 failed, 1 known-fail, 411 total  rc=1
    no-addon hrx-ops-test run B (same binary): identical 401/9/1          rc=1
    

    All 12 are structural/plan assertions, not value mismatches and not HSACO compile errors:

    • both builds: mixed_weight_layout_program.q6_k — requirement failed: decode_packed (hrx-ops-test.cpp:4506); qwen_decode_split_flash_attention.query1.kv512.masked.head96.value64 and .query4.kv513.masked.head96.value64 — requirement failed: q8_alternate != nullptr (cpp:5440).
    • no-add-on only: mixed_weight_layout_program.q4_k — weight_materializations == expected_materializations (cpp:4516); cpu_host_native_weight.q4_k, hrx_host_native_weight.q4_k, coherent_subregion_native_weight.q4_k — binding.layout == decode_layout (q4k-packed-k256-row64 vs ggml-native) (cpp:4034); uploaded_native_gated_q4 and dense_matmul_swiglu.q4_k.q4_k.swiglu.tokens1.outputs16384.input4096 — missing expected kernel (loom_libs:ggml_mul_mat_swiglu_f32_f32_lowtoken_dot / loom_libs:ggml_mul_mat_swiglu_q4_q8_1_x4_lowtoken_dot; ggml_kquant_swiglu_decode_* scheduled instead).

    The one known-fail per hrx-ops-test run is qwen_flash_attention.

    #3389 rows from the same runs: weight_persistence_sequence PASS in both builds (it was KNOWN-FAIL on the 23-Nov build — #505's re-point works); mixed_weight_layout_program.q4_k PASS add-on / FAIL no-add-on; .q6_k FAIL both. On the 23-Nov 408-case no-add-on run (runs/t3397b-1.log) both mixed_weight_layout_program rows were KNOWN-FAIL: the pin now requires them to pass and they do not. q4_prefill_source_eligibility is not in this build's case list.

    #3380 rows: qwen_decode_attention_output_next_q8.no_selectors and .selectors PASS in both builds and both runs (KNOWN-FAIL on the 23-Nov build). But the two qwen_decode_split_flash_attention.*.masked.head96.value64 device rows, which PASSed on the 23-Nov build, now fail with q8_alternate == nullptr: the device plan does not publish the FA Q8_1 alternate that the re-pointed row requires — the q8-copy path the last comment on #3380 describes.

    Baseline vs 23-Nov (runs/t3397b-1.log no-add-on 408 cases; runs/bump3..6-hrx-ops-test.log add-on; older pin): 5 of the 12 already FAILed there (cpu_host_native_weight.q4_k, hrx_host_native_weight.q4_k, coherent_subregion_native_weight.q4_k, uploaded_native_gated_q4, dense_matmul_swiglu...input4096); the 2 mixed_weight_layout_program rows were KNOWN-FAIL and are now required to pass; the 2 FA-split .masked.head96.value64 rows PASSed there. So the FA-split pair are the only clear new device failures on this pin.

    Caveats. The staged build was configured against the Oct-13 hrx-install (build-hrx/CMakeCache.txt: hrx_DIR=/home/bcloud/work/hrx-system/build/hrx-install, while the pin's third_party/hrx-system is 7f423692), and those stale runtime libs had to be replaced by the staged package runtime for the no-SVM env to open at all. The earlier "wedged GPU" blocked comments were a wrong diagnosis of the same staging/invocation problem. Removing the remaining runtime variable needs a rebuild+relink against third_party/hrx-system 7f423692 — not done here (lane instruction: no rebuild).

    Logs: /data/dev/cl-hrxtest/runs/ — dv6164-addon-test-hrx-ops.log, dv6164-addon-hrx-ops-test.log, dv6164-noaddon-hrx-ops-test{, -b}.log, dv6164-addon-trace-rows.log, dv6164-two-count.log, dv6164-issue-rows.log, dv6164.status.final.

  3. bong-water-water-bong commented on Nov 24, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Full device tier at the pin: 407/3/1 add-on, and all three failures are now explained + fixed in the fork (llama.cpp#508, #509)

    Lane `lane-bisect-fa`, 24 Nov. Recording the pin's device run and the bisect, per this issue's checklist item 4.

    At the pinned build (`ad10a171`, llama.cpp `6164e5ba`, gpu-kernels `87bdf514`, add-on, one `box-hold both` ticket, root): `HRX test summary: 407 passed, 3 failed, 1 known-fail, 411 total`. The 3 failures are all structural and all now explained:

    row cause fix
    `qwen_decode_split_flash_attention.query1.kv512.masked.head96.value64` fork #503's Q8_1 alternate comparator reads the alias source's shape (source `ne[0]=64`) llama.cpp#508
    `qwen_decode_split_flash_attention.query4.kv513.masked.head96.value64` same (plan loses the next-projection dispatch) llama.cpp#508
    `mixed_weight_layout_program.q6_k` the row compared ValueIds across two graph imports (#3389) llama.cpp#509

    Both rows PASS on the 23-Nov build and FAIL at the pin; the FA pair is a real regression across the pins (fork #503), the mixed row is a test bug that had never run on a device before.

    This issue's own rows: `rmsnorm.default`, `rmsnorm.hidden3840.tokens18`, `scheduled.scale_rmsnorm` and `dynamic_generic_ops.cpu_reference` PASS at the pin (add-on full run), and PASS in every run I made of the fixed trees - the restore in #3481 is not regressed by anything seen here. The compile-count / TTFT sweep of item 3 was not measured by this lane; it needs the pin's model run, which is separate from the ops test.

    Device evidence for the fixes: with #508 the two split-FA rows PASS on device (add-on suite 409/1/1); with #509 the two mixed rows PASS on device in both add-on and no-add-on builds (add-on suite 408/2/1); separately measured, no combined-ticket run. Neither ticket saw a GPU reset.

    Two environment notes for the next device lane (both hit by the earlier "wedged GPU" reports): run as root (`/dev/kfd` is 0600 root:root, no logind, so non-root gets `hsa_init RESOURCE_EXHAUSTED`), and give the staged dirs the pin's runtime libs from `/data/dev/cl-hrxtest/pkg/hrx/llama/bin` (`libhrx`, `libloomc`, and for the older staged builds `libomp.so`). With those, the box ran every ticket cleanly.

    Logs: `/data/dev/cl-hrxtest/runs/fa.status`, `fa-own-fix-full.log`, `fa3.status`, `fa3-prb-addon-full.log`.

    🤖 Generated with Claude Code

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions