Skip to content

fix: keep hrx-system at 98d05d94 (our loom-jit needs its AMDGPU runtime-globals API) - #359

Merged
bong-water-water-bong merged 1 commit into
mainfrom
fix/hrx-system-pin-98d05d94
Oct 8, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
fix/hrx-system-pin-98d05d94

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Current main does not compile with HRX. #353/#357 moved third_party/hrx-system to 4ba76c18eafe (our fork's 1bit/main, which merged AMD's c0b135a778cc). That merge carries AMD's loom commit 32d0c76a "[Loom] Make AMDGPU runtime globals compiler-owned", which deletes loomc_amdgpu_runtime_global_flags_t and loomc_amdgpu_emit_options_t from loom/binding/c/include/loomc/target/amdgpu/emit.h.

Our ggml/src/ggml-hrx/loom-jit.cpp still uses them, so the pinned pair fails:

loom-jit.cpp:70:5:  error: unknown type name 'loomc_amdgpu_runtime_global_flags_t'
loom-jit.cpp:557:59: error: use of undeclared identifier 'LOOMC_AMDGPU_RUNTIME_GLOBAL_FEEDBACK_CONFIG'
loom-jit.cpp:994:5:  error: unknown type name 'loomc_amdgpu_emit_options_t'
10 errors generated.

GitHub-hosted CI builds the pin without HRX, so it cannot catch this (see bump-hrx.yml); a from-scratch HRX build on strixhalo is what surfaced it.

Fix: restore third_party/hrx-system to 98d05d94a9f9e405683f8aeafc037f5ace0abe4a (our fork's previous revision, which exports the API at loom/binding/c/include/loomc/target/amdgpu/emit.h:37). Verified: recompiling loom-jit.cpp against 98d05d94 succeeds (rc=0). This is the constraint already recorded in OWNER-ACTIONS.md §"engine#336": "leaves hrx-system at 98d05d94 — AMD's hrx-system does not export loomc_amdgpu_runtime_global_flags_t, which our loom-jit path needs."

Pin rollback on purpose. llama.cpp is unchanged at e44c9d01a4d5.

Follow-up (forward direction): port loom-jit.cpp to the compiler-owned API and move hrx-system forward again — tracked separately so the release pin can build now.

#353/#357 moved third_party/hrx-system to 4ba76c18eafe (our fork's 1bit/main,
which merged AMD's c0b135a778cc). That merge includes AMD's loom commit
32d0c76a "[Loom] Make AMDGPU runtime globals compiler-owned", which removes
loomc_amdgpu_runtime_global_flags_t / loomc_amdgpu_emit_options_t.

Our ggml/src/ggml-hrx/loom-jit.cpp still uses those symbols, so the pinned
pair does not compile:

  loom-jit.cpp:70:5: error: unknown type name 'loomc_amdgpu_runtime_global_flags_t'
  loom-jit.cpp:994:5: error: unknown type name 'loomc_amdgpu_emit_options_t'
  10 errors generated.

GitHub CI builds the pin without HRX, so it cannot catch this. 98d05d94 is
our fork's previous revision and exports the API (loom/binding/c/include/
loomc/target/amdgpu/emit.h). Compiling loom-jit.cpp against it succeeds.

This restores the constraint already recorded in OWNER-ACTIONS.md: hrx-system
stays at 98d05d94 until our loom-jit path is ported to the compiler-owned API.
@bong-water-water-bong bong-water-water-bong added the pin rollback Moves a submodule pin backwards on purpose (skips the pin check) label Oct 8, 2026
@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) October 8, 2026 05:43
@bong-water-water-bong
bong-water-water-bong merged commit 6ebe320 into main Oct 8, 2026
8 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the fix/hrx-system-pin-98d05d94 branch October 8, 2026 05:46
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

353 - Partially compliant

Compliant requirements:

  • Move third_party/llama.cpp to the correct commit
  • Move third_party/hrx-system to the correct commit
  • Resolve conflicts as described
  • No changes to .github/workflows
  • CI builds without HRX

Non-compliant requirements:

  • Validation on Strix Halo with test-backend-ops -b HRX0 not explicitly shown in diff but required by ticket

Requires further human verification:

  • Validation on Strix Halo with test-backend-ops -b HRX0 needs to be confirmed by human

357 - Partially compliant

Compliant requirements:

  • Both submodules moved to AMD-pinned pair
  • Our own commits applied
  • Conflicts resolved as described
  • No changes to .github/workflows
  • CI builds without HRX

Non-compliant requirements:

  • Validation on Strix Halo with test-backend-ops -b HRX0 not explicitly shown in diff but required by ticket

Requires further human verification:

  • Validation on Strix Halo with test-backend-ops -b HRX0 needs to be confirmed by human

336 - Partially compliant

Compliant requirements:

  • Pin third_party/llama.cpp to correct commit
  • Pin third_party/hrx-system to correct commit to retain needed API
  • Verified with test-backend-ops -b HRX0
  • Verified recompilation of loom-jit.cpp succeeds

Non-compliant requirements:

  • Validation on Strix Halo with test-backend-ops -b HRX0 not explicitly shown in diff but required by ticket

Requires further human verification:

  • Validation on Strix Halo with test-backend-ops -b HRX0 needs to be confirmed by human
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

API Compatibility Issue

The PR reverts third_party/hrx-system to commit 98d05d94 to maintain compatibility with loom-jit.cpp, which depends on loomc_amdgpu_runtime_global_flags_t and loomc_amdgpu_emit_options_t that were removed in the newer commit 4ba76c18eafe. This is a necessary compatibility fix to prevent compilation errors when building with HRX enabled.

Subproject commit 98d05d94a9f9e405683f8aeafc037f5ace0abe4a

bong-water-water-bong added a commit that referenced this pull request Oct 9, 2026
#361 (c4d9a9b) is titled "Bump HRX: llama.cpp 02f2880c9f42 + hrx-system
4ba76c18eafe (AMD's tested pair)" but its diff changes only
third_party/hrx-system. The llama.cpp gitlink stayed at e44c9d01a4d5, whose
ggml/src/ggml-hrx/loom-jit.cpp still uses loomc_amdgpu_runtime_global_flags_t,
loomc_amdgpu_emit_options_t and LOOMC_AMDGPU_RUNTIME_GLOBAL_*, which
4ba76c18eafe removed. The pinned pair therefore does not compile:

  loom-jit.cpp:70:5: error: unknown type name 'loomc_amdgpu_runtime_global_flags_t'
  loom-jit.cpp:553:1: error: unknown type name 'loomc_amdgpu_runtime_global_flags_t'
  ... 10 errors, all in loom-jit.cpp

GitHub CI builds the pin without HRX (ONEBIT_HRX defaults OFF), so it cannot
catch this class of break; a from-scratch HRX build on strixhalo is what
surfaced it.

Restore third_party/hrx-system to 98d05d94a9f9, the revision #359 pinned and
which exports the API our loom-jit path needs. llama.cpp is unchanged.

Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Oct 9, 2026
…e new revision dropped (#365)

AMD removes public LoomC symbols without notice: loom 32d0c76a (in hrx-system
4ba76c18) dropped loomc_amdgpu_runtime_global_flags_t and
loomc_amdgpu_emit_options_t, which our ggml/src/ggml-hrx/loom-jit.cpp uses.
CI here builds without HRX, so #353, #357 and #361 merged a submodule pair that
does not compile with ONEBIT_HRX=ON, and #359 and #363 pinned hrx-system back by
hand (KNOWN-ISSUES.md).

The bump now checks, at the header level, that every loomc_* / LOOMC_*
identifier used under ggml/src/ggml-hrx at the new llama.cpp revision is still
declared under loom/binding/c/include at the new hrx-system revision. If one is
missing, the PR moves llama.cpp only, keeps hrx-system where it is, and says so
in its body and in a workflow warning. When neither submodule moves, no PR is
opened (#361 moved one gitlink only).

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
bong-water-water-bong pushed a commit that referenced this pull request Nov 14, 2026
…ixes and the #2392 labels)

15 fork commits past 6485e5d69. They include the four host-tier checks the
#327 merge left asserting retired forms (#352, engine#2388, now closed: loom
host tier 87/0), HostWeightCache's gauges and the misaligned-pointer refusal
(#356/#357/#358, engine#2393), and the add-on case labels (#355/#359/#362,
engine#2392). Registry regenerated. hrx_f16_narrowing --write records one
guard GAINED (flash_attention/online_softmax: #347 floors the max before the
scale); none lost.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 14, 2026
…337/#339), and the engine builds and tests against it (refs #2138) (#2357)

* third_party/llama.cpp: pin to llama.cpp #327's head 2c178f44 (engine#2138)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chat template: build against #327's common_json (engine#2138)

At llama.cpp #327, common/jinja/value.cpp works through common_json (common/json.cpp)
and global_from_json takes one. At that pin 1bit and npu_template_test failed to link
(undefined common_json::is_null() and the rest, then global_from_json<ordered_json>).

- onebit_jinja compiles common/json.cpp. Its JSON_ASSERT is GGML_ASSERT, and the binary
  does not link ggml, so app/jinja_ggml_abort.cpp defines ggml_abort(): the same
  file:line message on stderr, then abort(). ggml.h is read for the declaration only.
- render_chat_template hands the renderer common_json::parse(in.dump()). common_json is
  an ordered_json underneath, so the request's key order survives the round trip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* registry: regenerate at 2c178f44, six reviewed classes are now real architectures (engine#2138)

registry_pins failed after the pin move (recorded e6c80014e, pinned 2c178f44b);
tools/registry_build.py regenerates it (hrx 350, npu 9). Then registry_gaps failed:
six classes docs/arch-gaps.md had declined are mapped at the new pin. Each has its own
converter class, LLM_ARCH_ entry and src/models/*.cpp graph at 2c178f44, so each gets a
mapped_ok reason and a dated note: HrmTextForCausalLM, MuseSparkForConditionalGeneration,
Glm5NextForConditionalGeneration, GraniteSwitchForCausalLM, Lfm3ForCausalLM, and
DFlash2DraftModel. For DFlash2 this is the condition the page set: the converter writes the
conv and selector keys and codebooks, and dflash.cpp builds both heads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* census_watch_test: the classes pin 2c178f44 implements are covered, not declined (engine#2138)

After the registry regenerated at 2c178f44, 22 checks failed. Each one used DFlash2,
Muse Spark, Granite Switch, LFM3, MiniCPM-V 4.7 or MiniCPM-OCR as its example of a
declined or unmapped class, and the live registry now maps all six for hrx.

- Section 15b asserts the four reviewed classes as covered and silent, each with a
  mapped_ok reason and a dated docs/arch-gaps.md note, the way DeepseekV41 moved at 5e6388a5a.
- The FLM pack rows for MiniCPM-V 4.7, MiniCPM-OCR, DFlash2 and LFM3 take the
  hrx-only NPU-gap branch Hy-Memory already used.
- The unmapped FLM example is the same recorded listing against a registry without
  MiniCPM-V 4.7 (the one before this pin), so the listing payload is not edited. The live
  registry's `!! NPU FLM` line for it is checked too.
- The declined-pack example is an inline NeedleForToolCalling entry; LFM3 is no longer declined.

A mutant that drops Lfm3ForCausalLM's mapped_ok fails 15b.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* third_party/llama.cpp: pin to #327's merge commit 2f7f04f0 (engine#2138)

#327 squash-merged into 1bit/hrx-vulkan-patched as 2f7f04f0d, which is that branch's head.
It contains the old pin e6c80014 and fork #335 (039edcc55), the commit #327's head lacked.
Regenerated at that tree, the registry changes only the recorded pin: the same 350 mappings
and the same six mapped_ok classes as at 2c178f44.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* third_party/llama.cpp: pin to the fork head 912c079d8 (engine#2138)

912c079d8 is 2f7f04f plus llama.cpp#337 (b1fd5e8eb: the parser tools, HRX ctest rows and
working files the #327 squash missed) and #339 (13 HRX tests return 77 without an HRX0
device). Both are tests and tools only, with no src/ggml/include/common change. Regenerated,
the registry changes only the recorded pin.

Full build + ctest at this pin: the same 2 non-linking NPU targets; the only steady failure is
hrx_f16_narrowing_check. Four tests failed under a load average of ~58
(spec_decode_acceptance, tool_help_check_tests, npu_pack_import, npu_serve_smoke_self) and
passed rerun on their own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* engine#2138: pin llama.cpp to 6485e5d69 (the fork head: #345's dequant definitions + #341)

912c079d8 could not link its routed MoE kernels (unresolved exact declaration
'@ggml_codebook_f16_vector4', measured by pi-os3 serving flint). llama.cpp#345
defines the motifs the #327 merge left declared; #341 aligns the HRX suites'
kernel-name checks with the merged tree. Registry regenerated for the pin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* engine#2138: record the 34 narrowing bodies and 11 f16 accumulators the AMD merge brings, by what feeds them

hrx_f16_narrowing.py --write at the #2357 pin (6485e5d69). It refuses to write a
smaller guard set, and none was lost: the 10 guarded bodies are unchanged. The
narrowing baseline header groups the new bodies by the producer of the narrowed
operand: unguarded f32 activations into f16 WMMA tiles (engine#1962's open
question), AMD's routed f16_projection_q{4,5,6}k without this line's guard marker
(engine#2127), dequantized weights, attention probabilities/scales, published
f16 outputs, q8_1 d/s, gated-delta-net state, and one test kernel.
dequant.loom 20 -> 21 is #345's ggml_codebook_f16_vector4. The stale
attention_postprocess_f32_f16 line is dropped (3 -> 0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* engine#2138: pin llama.cpp to ca5aac715 (fork head: the #2388/#2393 fixes and the #2392 labels)

15 fork commits past 6485e5d69. They include the four host-tier checks the
#327 merge left asserting retired forms (#352, engine#2388, now closed: loom
host tier 87/0), HostWeightCache's gauges and the misaligned-pointer refusal
(#356/#357/#358, engine#2393), and the add-on case labels (#355/#359/#362,
engine#2392). Registry regenerated. hrx_f16_narrowing --write records one
guard GAINED (flash_attention/online_softmax: #347 floors the max before the
scale); none lost.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* engine#2138: pin llama.cpp to e1be68de6 (fork head: #364, test-hrx-buffer agrees with #356)

The 04:10Z CHANGES at f7d3265 named a regression the #2393 fixes introduced:
after #356 HostWeightCache::clear() keeps the lifetime counts, as AMD's does,
but our test-hrx-buffer still asserted hits == 0 after a clear. #364 makes
that test expect the lifetime counts, so both suites assert one contract.
The fork diff ca5aac715..e1be68de6 is that one test file. Registry regenerated;
the narrowing baselines are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* engine#2138: pin llama.cpp to a21b25099 (fork head: #365 and two test-only commits)

#365 makes AMD's hrx-loom-jit-test pass the compile configs this line's kernels
require (value_stride, ssm_conv n_t/n_s, copy_transpose_f16 shape), the
remaining unexplained suite in the 05:42Z CHANGES at 1afedb3. The other two
commits (#1c436c2ee, 8ce550f08) are also tests only: e1be68de6..a21b25099
touches no ggml/, src/ or common/ file. Registry regenerated; the narrowing
baselines are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* engine#2138: pin llama.cpp to ea2d2eb07 (fork head: #2404's hrx-loom-jit-test fixes)

a21b25099..ea2d2eb07 is one test file (tests/hrx-loom-jit-test.cpp, ed1e594f7
and ea2d2eb07): the Dynamic-workload gap is labelled known-fail instead of
failing, so AMD's hrx-loom-jit-test is 6/0/1 known-fail (pi-os3, 07:35Z) and
engine#2404 is closed. No ggml/, src/ or common/ change. Registry regenerated;
narrowing baselines unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pin rollback Moves a submodule pin backwards on purpose (skips the pin check) Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant