mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1084] [CLOSED] hip/gfx906: __dp4a falls back to a 4-iteration loop although gfx906 has v_dot4_i32_i8 #3012
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#3012
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/1084
Author: @xxDoman
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:gfx906-140.1-dp4a📝 Commits (1)
b7c2a11hip/gfx906:__dp4afalls back to a 4-iteration loop although gfx906 has v_dot4_i32_i8📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
include/strata/hip_compat/intrinsics.hpp(+3 -2)📄 Description
Re-creation of #1067 on the new main (the history rewrite closed it; the file is byte-identical to v0.1.40, so I cherry-picked my commit onto
main).What
dp4aininclude/strata/hip_compat/intrinsics.hpphas a native signed-dot4 path for RDNA3/RDNA4 (__builtin_amdgcn_sudot4) and gfx103x (__builtin_amdgcn_sdot4), and a portable 4-iteration loop for every other target. The gfx906 build (STRATA_HIP_GFX906) is one of those, 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 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, bit-identical to what the gfx103x path produces.Ordering
Independent of the build fix (#1083): on the current tree
fused_gr.cudoes not even compile, but this change is orthogonal. 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 (~+2-4%); the value itself is one machine, so I would not quote it as a benchmark. An exactness check against the portable path 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.