Repository navigation
ggml-hrx: ADD_ID and SWIGLU_OAI on HRX (gpt-oss: 193 -> 49 graph splits) - #67
Merged
bong-water-water-bong merged 2 commits intoOct 2, 2026
Merged
Conversation
ops/add_id_f32.loom + dispatch_registration/common/dispatch-add-id.cpp (ours): output[t][r] = input[t][r] + bias[ids[t][r]], ids read through its row stride (llama.cpp passes a view of the argsort), an out-of-range id reads expert 0. GGML_OP_ADD_ID joins the eager capability list in ggml-hrx.cpp. gpt-oss-20b graph splits 193 -> 97. check.case vs a one-workitem-per-value reference (iree-test-loom --sanitizer=access: exact). test-backend-ops ADD_ID reports the n_experts_used < n_experts cases as not supported because the standalone I32 VIEW of ids is not claimed on its own; inside a model graph the view is an alias and ADD_ID runs on HRX. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ops/swiglu_oai_f32.loom + dispatch_registration/common/dispatch-swiglu-oai.cpp (ours): two contiguous inputs, x = min(gate, limit), y = clamp(up, -limit, limit), x / (1 + exp(-alpha x)) * (y + 1), as ggml-cpu. GluParams carries alpha and limit (op_params 2 and 3), compared in glu_params_equivalent and kept in the diagnostics JSON. check.case (2050 values, inputs past +-limit) vs a reference, --sanitizer=access. test-backend-ops SWIGLU_OAI: the 4 contiguous cases (alpha 0.5 / 1.702, limit 2 / 7) OK, the 4 view cases not supported. gpt-oss-20b graph splits 97 -> 49, pp512 648.6, tg128 29.3 tok/s. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong
changed the base branch from
1bit/hrx-mmid-g32-v2
to
1bit/hrx-vulkan-patched
October 2, 2026 12:43
Author
|
Review (PR-Agent duty): approve.
Merging when the hosted jobs pass. |
bong-water-water-bong
merged commit Oct 2, 2026
74b8dea
into
1bit/hrx-vulkan-patched
14 of 31 checks passed
This was referenced Nov 12, 2026
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.
Stacked on #66; it retargets to
1bit/hrx-vulkan-patchedonce #66 merges. Two gpt-oss ops that ran on the CPU in every layer now run on HRX, in our own files.ADD_ID (gpt-oss expert biases, 3 per layer)
ops/add_id_f32.loomanddispatch_registration/common/dispatch-add-id.cpp.output[t][r] = input[t][r] + bias[ids[t][r]]; ids are read through their row stride (llama.cpp passes a view of the argsort). An out-of-range id reads expert 0, so it can't read out of bounds.GGML_OP_ADD_IDadded to the eager capability list inggml-hrx.cpp.iree-test-loom --sanitizer=accessgives exact results.n_experts_used < n_expertscases report "not supported": test-backend-ops askssupports_opfor the standalone I32VIEWof ids, which HRX doesn't claim on its own. Inside a model graph the view is an alias and ADD_ID runs on HRX.SWIGLU_OAI (gpt-oss clamped SwiGLU)
ops/swiglu_oai_f32.loomanddispatch_registration/common/dispatch-swiglu-oai.cpp. Two contiguous inputs;x = min(gate, limit),y = clamp(up, -limit, limit),x / (1 + exp(-alpha x)) * (y + 1), as ggml-cpu.GluParamsgainsalphaandlimit(op_params 2 and 3, zero for the other GLU kinds). They're compared inglu_params_equivalent, so programs with different values aren't shared, and written to the diagnostics JSON.--sanitizer=access.gpt-oss-20b (MXFP4, HRX0, balanced power mode, this branch's build)
Greedy text is correct ("The sky appears blue because the Earth's atmosphere scatters sunlight..."). Full suite 1061/1061.
The rest of gpt-oss's CPU work is
FLASH_ATTN_EXTwith attention sinks (both HRX FA matchers require 4 inputs). That's next.🤖 Generated with Claude Code