Commit 8c60a12
jmonk
test: register e2e coverage, fix bug-1-encoding expectation, add pk4 e2e; fix pk4 K>=128 type check
Review-round changes, all four from doplxyz's independent verification
(github.com/doplxyz/ck3759-gfx1201-verification):
- SparseTransformsTest.SingleNonZeroPerGroup expected {V, V}: the second
compressed slot leaking a_vec[slot3] through the pre-fix {a[2], a[3]}
default -- bug 1 recorded as the expected result. Corrected to {V, 0}
with a HISTORY note; this was the only registered case supplying a
group with fewer than two survivors, which is exactly where bug 1
bites.
- The standalone repro moves from test/ck_tile/gfx1201_sparse_swmmac/
(unregistered, no CMakeLists) into test_amdgcn_sparse_mma.cpp as
SparseSwmmacE2E.{AdversarialGeneratedTile,CanonicalPatternControl};
the compile-time USE_CANONICAL_PATTERN toggle becomes a runtime
parameter so the control runs in the same binary. Runtime-skipped on
non-gfx12 devices.
- New SparsePk4E2E.AdversarialInt4AllShapes (K=32/64/128/256): first
in-tree numerical coverage for the packed-nibble path (bugs 2/3).
Ported with attribution from doplxyz's MIT-licensed pk4_e2e harness:
dense int4 CPU oracle over logical values (independent of the
transform under test), guard-banded host fill via CK's own register
maps. K=128/256 also lock bug 2 and the type-check fix below at
compile time -- idx word counts only diverge at FragsK > 1.
- checkATransformResult (sparse_mma_pipeline.hpp) re-derived the
expected transform type via execExtVec with the defaulted
LogicalADataType, resolving PackedSize to 1 while the real exec call
passes ADataType and gets 2 -- so the pk4 pipeline failed to compile
at K>=128. Fix (explicit template arguments) by doplxyz, applied
verbatim.
- ARCH SCOPE comment extended: one-hot sweeps with bare
v_swmmac_*_iu4_w32 builtins show the gfx1201 idx law is a plain
identity in raw nibble coordinates; SWAP + XOR-1 encode
CK_TILE_USE_PK4_LAYOUT_SHUFFLE's high-nibble-first convention, not a
hardware quirk, and config.hpp pins that macro on (the pk_int4.hpp
#else branches are unreachable). Convention dependency documented
alongside the existing per-architecture re-measurement instruction.
Verified on gfx1201 (Radeon AI PRO R9700, ROCm 7.14): all 21 tests in
test_amdgcn_sparse_mma pass, including the four pk4 shapes (max_abs_err
= 0 exact), the adversarial e2e that fails on the unfixed tree, and the
corrected single-survivor case.
CCA1 parent ad79359 commit 8c60a12
4 files changed
Lines changed: 717 additions & 427 deletions
File tree
- include/ck_tile/core/arch/mma/sparse
- test/ck_tile
- core/arch/mma/pipeline
- gfx1201_sparse_swmmac
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
177 | 191 | | |
178 | 192 | | |
179 | 193 | | |
| |||
0 commit comments