Repository navigation
tests: 9..16-token K-quant MUL_MAT and gate/up SwiGLU rows with activations past f16 (engine #2293) - #333
Conversation
…s past f16 (engine ggml-org#2293) The token loop at 12 tokens and the fused gate/up + SwiGLU at 12 and 16 tokens read the activations' per-block sums (q8_1_x4 s, stored in f16). No case reached them with large activations. Adds test_mul_mat_vec_fusion_large_activation (the same fill as test_mul_mat_large_activation, on the shared input) and six rows: q4_K and q5_K, MUL_MAT n=12 and MUL_MAT_VEC_FUSION m=12/16, magnitude 9.1e4. On HRX0 they run on hip.kquant_tokens.mm / .swiglu: gpu-kernels main 0/6, with the engine ggml-org#2293 part 2 branch 6/6. Like the other magnitude rows, they gate only once that branch is in the add-on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ready for review at 28b3fb2 (the measured binary was built from 4aa15fe5e, the same 40-line test change on an older base; identical +/- lines) |
|
VERDICT: READY at The rows are the deliverable" Duplicate note, with the measurement#334 is a byte-identical copy of this PR ( Ask (either PR, once): declare the pair in both bodies. A reviewer reading one alone cannot tell the other exists, and whichever merges second conflicts in the very file the change is about. Why this row matters beyond the PR
|
|
Duplicate of #334, by content, and this one should be closed with I diffed the added lines each PR produces from its own merge base ( #334 carries the same commit rebased onto the current pin and measured as a pair (A: add-on main So the substance is READY on #334, and the reason to prefer that head is that it is rebased and its measurement pair is complete.
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 28b3fb2: READY
This is the gate the kernel side was missing, and it is in the right place — the upstream test suite, not a bespoke tool someone has to remember.
The PR's own diff is 40 lines in one file: a test_mul_mat_vec_fusion_large_activation subclass with a magnitude parameter, over the existing fused gate/up SwiGLU case. That is exactly what I asked for when reviewing gpu-kernels#68: an arm at a large activation magnitude, because the prescale it adds is invisible to every case that stays in f16's range. #70's reproducer names the same thing — test-backend-ops MUL_MAT magnitude=91000 on q8_0 / iq4_xs / q5_K / q6_K.
Two review notes:
- I am verifying against the branch these are based on, not
master. Diffing either of these PRs againstorigin/masterreports 611 files — this fork's branches sit far ahead ofmaster, so a base-relative diff is meaningless here. Against the integration branch it is the 40-line change above. Worth stating because it is the difference between reviewing one test case and reviewing the whole vendor tree. test_mul_mat_vec_fusionis the right parent to extend: it already carries the type/m/n/k parameterisation and the eval-versus-perf split, so this adds a magnitude axis to a case that already knows how to compare against the CPU — rather than a second, parallel harness that could drift.
This PR and #334 carry the same change: tests/test-backend-ops.cpp is blob 607c2d479b in both, though the heads differ. I reported that on #334. One of the two should be closed with its branch deleted (gh pr close N --delete-branch); this one is the earlier of the pair, so it is the natural survivor, and it now has a verdict either way.
What makes this pairing complete: the kernels publish the 2^-6 convention (kCommonF16ActivationScaleLog2 in gpu-kernels#70, the prescale in #68), and this is the test that fails when a conversion site is added without it — which is precisely the interaction I flagged between #67 and #68, now with a case that would catch it.
…ugh #333, #330 included) Per ORCH 11-13 10:10Z, onto this branch. Conflicts: - dispatch-gated-delta-net: ggml-org#1925's append_covered_pattern_node beside AMD's norm matcher - ggml-hrx.cpp: ggml-org#856's file-mapped model buffer (AMD's duplicate host-pointer buffer removed); mmap_support follows the same switch - command-program-executor: AMD's main_write and ggml-org#2137's weight-copy trace - tests/CMakeLists.txt: both lines' tests (test-hrx-ops is restored in its own commit) - test-backend-ops: AMD's test_mul_mat_id plus ggml-org#2167's activation_scale as the trailing parameter; the four scaled calls pass m_v/ids_offset/skip first so the scale is not read as m_v Also: ggml-org#856's mapped buffer type uses designated initialisers (the merged ggml interface added alloc_buffer_n / get_alloc_size_n). tests/test-hrx-ops.cpp stays deleted here and comes back in the next commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs 1bit-MONSTER/engine#2293 (part 2 test rows).
What
tests/test-backend-ops.cppgets six magnitude rows for the 9-16-token K-quant path, which no existing row reached:test_mul_mat_large_activationfor Q4_K and Q5_K at n=12 (k=4096, m=2048, magnitude 9.1e4)test_mul_mat_vec_fusion_large_activation(gate/up SwiGLU, the same ±magnitude fill astest_mul_mat_large_activationon the shared input) for Q4_K and Q5_K at 12 and 16 tokensOne file, 40 added lines, no behaviour change outside the test.
Measured
On HRX0, gfx1151, one gpu-hold ticket, with the HIP add-on at gpu-kernels main (which now includes the add-on fix, gpu-kernels#70):
-p magnitudeBefore that add-on fix, the 6 rows fail (0/6, non-finite output). That makes them the regression rows for it.
Not covered
The engine reaches the add-on fix only when its gpu-kernels pin moves. Until then these rows pass only in a build with the current add-on.
🤖 Generated with Claude Code