Repository navigation
hrx: res_scale_pair without a runtime divisor, with Loom check cases - #37
Merged
bong-water-water-bong merged 1 commit intoSep 29, 2026
Merged
Conversation
Newer Loom (hrx-system 244cd38) lowers integer division only for constant divisors on AMDGPU and requires memory ops to be provably in bounds, so the kernel's index.rem by the runtime row size stopped compiling there (TARGET/003); the engine's pinned Loom still accepted it. The launch is now a 2-D grid (x over a row's channels, y over rows, new row_count parameter) with an explicit bounds guard, so no thread divides. Adds three check.case differentials (bias + addend, per-channel scale, and plain mode where b and y must not be read). All pass under iree-test-loom --device=amdgpu --sanitizer=access with hrx-system 244cd38. ZAYA1-8B HRX0: output identical (288/288 greedy tokens, max |dlogprob| 0), decode 66.5 -> 66.6 tok/s (unchanged). Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong
merged commit Sep 29, 2026
1162dda
into
1bit/hrx-vulkan-patched
10 of 24 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows Ben Vanik's Loom workflow (https://gist.github.com/benvanik/de81be5ae7caa6c7873be856c4b16c80): correctness cases in the
.loomsource, run under the access sanitizer on real hardware.What was wrong. Doing that for #35's kernel found a real portability bug. Newer Loom (hrx-system 244cd38) has two rules the engine's pinned Loom doesn't enforce:
The kernel's
index.remby the runtime row size was rejected (TARGET/003, then SUBRANGE/024), so it would have broken at the next HRX bump.The fix.
row_countparameter. No thread divides.row_count, and the manifest declares it.Cases (
check.case, periodic iotas so each checks the per-channel broadcast):bandyare filled with 100 and must not be read.All three pass under
iree-test-loom --device=amdgpu --sanitizer=access --config=...with hrx-system 244cd38. The--configvalues are listed in the file.Engine JIT (current pin): ZAYA1-8B HRX0 output is identical (288/288 greedy tokens, max |Δlogprob| 0). Decode is 66.5 -> 66.6 tok/s, i.e. unchanged.
🤖 Generated with Claude Code