Commit 0ebebed
committed
perf(GFX1100-TG200): put back the HW dot instruction T4a replaced with a scalar loop
T4a (51f5222, #2790) rewrote Dp4a in rocm_grouped_gemm.hip from __ockl_sdot4
to four int8 multiplies and four adds, and rewrote the comment above it to say
the hardware instruction is "a perf lever, not a correctness requirement". Dp4a
is the integer core of every K-quant GEMM on this backend.
scripts/check-rocm-dp4a-intrinsic.py exists for exactly this and says why in its
own docstring: the scalar form is bit-identical but ~1.4x slower on the
KQuantGemmK prefill path, a CPU-only ctest stays green either way because the
ROCm kernel is not compiled there, so only a source checker can hold the lever.
Its mutation test then failed in preflight with "mutation did not apply" --
there was no longer an intrinsic call to mutate.
Both descriptions agree the forms are bit-identical, so this changes no output.
It restores the instruction, the ~1.4x, and the gate: the checker reports OK and
tests/scripts/test_check_rocm_dp4a_intrinsic.py is 6/6.
Closes #2939.
FOLLOWING_AGENTS_PROTOCOL
Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5-1m [claude-code]1 parent 86f0f9b commit 0ebebed
1 file changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
0 commit comments