mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #999] [CLOSED] hip: the fused-int8 MoE kernels on gfx1100 rocWMMA - opt-in STRATA_PF_FUSED arm + parity fixture (engagement: parity, REJECT-at-parity recorded) #2954
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2954
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/999
Author: @xyzzing
Created: 10/5/2026
Status: ❌ Closed
Base:
main← Head:moe-fused-wmma-gfx1100📝 Commits (10+)
749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it57bd713sycl: pipeline the expert cache's profile fill (model load 3-4x faster)📊 Changes
1 file changed (+10 additions, -6 deletions)
View changed files
📝
CMakeLists.txt(+10 -6)📄 Description
What this is
The fused-int8 MoE expert kernels (
moe_fused_iq.cu, CUDA sm_80-only upstream) translated to rocWMMA 16×16×16 INT8→INT32 for gfx1100/RDNA3:native_kernel_wmma<T, GU, WW>behind the existing opt-in env (STRATA_PF_FUSED=1, plusSTRATA_PF_FUSED_NATIVEsemantics preserved) — same batch machinery (grouping tables, work-item walk, per-row IQ decode via the project'sconvert()/signed8semantics), plain LDS int8 tiles (the ldmatrix swizzles dropped — rocWMMA reads unswizzled tiles), themma_tile_16rocWMMA primitive chained per 16-k slice, and the original per-half/per-sub-block fp32 scale folds applied per-lane from the i32 readbacks (the m16n8 lane mapping — so the SwiGLU/requant and down-scatter epilogues run verbatim).Verdict up front: engagement REJECT at parity — measured, not promoted, per the project's arm pattern. On gfx1100 (7900 XTX, nightly ROCm, 128K × 3 paired engine cells): the production MMQ path and this arm are at parity (-0.8% end-to-end; gate/up +1.7%, noise). The pinned ggml's MMQ tiles are already RDNA3-aware (
mmq-config-rdna3.cuh), so the generic-tile headroom this translation targeted does not exist. The arm ships opt-in dormant and parity-protected.The fixture (the substance)
prefill_fused_iq_wmma_test(HIP CTest): the IQ3_S gate/up chain — decode (verbatimconvert()/signed8semantics) → plain LDS int8 tiles → rocWMMA mma → per-half/per-sub-block fp32 scale folds — against a double reference on the same quantized activations:to_floatBounds pre-declared before the kernel existed (1e-4 RMS / 1e-3 worst row); no tolerance moved.
Traps the fixture caught (all in the translation, all fixed)
signed8mis-port: the sign spread is one bit per value (__vcmpne4(s & 0x08040201, 0)masks), not bit-7 replication — half the values decoded wrong with the naive port__half2float((unsigned short) x)on HIP converts the integer, not the bits — needs__ushort_as_half(the CUDA arm never runs this path on HIP, so it never showed)ws[2*uj],ws[2*uj+1]) vs per-16-group reads — the fold must index the sub-block's own scale__half2float-class traps aside, the fixture also pinnedmatrix_b col_major=ptr[n·ld + k]and 16×16 accumulators (ld = N)Testing
prefill_fused_iq_wmma_test: PASS (bounds 1e-4/1e-3 RMS/worst-row), deterministic ×3gdn_wy_check,gdn_wy_wmma_testsuites: unchanged, green on the same treeSTRATA_PF_FUSED=1vs absent, same binary — parity within noise; decode untouched (prefill-only arm,--max-new 8cells)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.