mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1067] [CLOSED] hip/gfx906: __dp4a falls back to a 4-iteration loop although gfx906 has v_dot4_i32_i8 #3006
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#3006
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/1067
Author: @xxDoman
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:gfx906-140-dp4a📝 Commits (10+)
f4e96d5tests: gdn_rec_head also compares the PP (variant 4) and two-column (variant 5) recurrence kernels, bitwise16bc95aprefill: STRATA_HCD_EXACT=1 - the HC down projection by a WMMA kernel with hipBLASLt solution 1176/1177 k order (StaggerU included), bitwise502fcef#606: the fused SwiGLU q8_1 quantizers keep the block's scale and sum finite too64d0136cache: preserve checkpoints when split allocation failsa0d0056prefill: fused-expert exact wins (table16 via direct selector, float4 moe_combine, LDS alias + occupancy)5f5452bserve: park_current's try covers the checkpoint split too (#752): a host OOM skips parking8b19a38Layer split: --vram-reserve-later-mib, a separate reserve for the later cardsea83d0dResident RAM mode with a layer splitd2d981fsetup: the low-RAM mode's resident variant on several GPUs (#642)cd62e5eserve: a split's stage-0 GPU profile line keeps its text (#848); later stages say which stage📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
include/strata/hip_compat/intrinsics.hpp(+3 -2)📄 Description
What
dp4aininclude/strata/hip_compat/intrinsics.hpphas a native signed-dot4 path for RDNA3/RDNA4 (__builtin_amdgcn_sudot4) and for RDNA2 gfx103x (__builtin_amdgcn_sdot4), and a portable 4-iteration loop for every other target. The gfx906 build (STRATA_HIP_GFX906) is one of the "other targets", so every__dp4ain the decode path is 4 iterations instead of one instruction.gfx906 (CDNA1 / GCN5, Instinct MI50/MI60, Radeon VII) has
v_dot4_i32_i8, the same instruction the gfx103x branch already uses:Fix
One line: add
__gfx906__to the gfx103x condition. Same signed x signed byte products, accumulated modulo 2^32, no clamp — exactly the CUDA__dp4acontract, and bit-identical to what the gfx103x path produces (no new instruction semantics are introduced).Note on ordering
This is independent of the build fix in #1066: on the current tree
fused_gr.cudoes not even compile, but this change is orthogonal to it. Either order works.Measurement (2x gfx906, not a repo benchmark)
Instinct MI50 32 GB master + Radeon VII 16 GB helper, IQ3_XXS, ctx 32000, 11552-token prompt, 128 decode, MI50 at 200 W, 4 runs:
The decode difference is the point (~+3-4%); the value itself is one machine, so I would not quote it as a benchmark. An exactness check against the portable path (the tree's
testsdp4a parity, or a small local one) is the right gate — happy to run and post it here if you want it before merging.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.