mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3429] [CLOSED] [Engine] HIP: the expdec shared int4 arrays use the attribute-after-declarator form #4631
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#4631
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/3429
Author: @chenxyz129
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:hip-expdec-align📝 Commits (1)
45423b7fix(HIP): the expdec gate/up and down kernels use the #778 shared-array form (gfx1030/gfx1032)📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
src/kernels/cuda/iq_kernels.cu(+6 -2)📄 Description
Problem and result
Before: on
main(c62d5e3a, Control 0.2.9 / engine 0.1.55), a HIP build for gfx1032 stops insrc/kernels/cuda/iq_kernels.cu:Those are the two expdec kernels added in v0.1.45 (gate/up and down), which declare
__shared__ alignas(16) int4 s_u[...]. The same file already carries the working form right next to them:STRATA_SHARED_ALIGN16_U32, with the #778 comment saying that HIP takes the attribute after the declarator.After: a
STRATA_SHARED_ALIGN16_I4macro mirrors that one (__shared__ int4 name[...] __attribute__((aligned(16)))under
__HIPCC__,alignaselsewhere), and the two kernels use it. Array type, size and alignment are unchanged.Related discussion
Refs #2784 (the gfx1032 setup PR; its engine build needs this fix).
Approach
One macro beside the existing
STRATA_SHARED_ALIGN16_U32, and the two declarations switched to it. No kernel logic,no launch configuration and no numerics change: this only makes the expdec source compile for HIP again.
Validation
Passed:
45423b7f(mainc62d5e3a+ this patch),ninja -C build-hipfor gfx1032 -> all 89targets built and
stratalinked;./build-hip/strata --version->strata 0.1.55.Environment: Fedora, ROCm 7.1.1 (hipcc 7.1.52802), AMD RX 6650 XT (gfx1032, 8 GB).
Failed:
c62d5e3a, the sameninja -C build-hipfor gfx1032 fails with the two'alignas' attribute cannot be applied to typeserrors quoted above (lines 2571 and 2758). That is the problemthis fixes.
Not run:
strata-device --selfteston this revision; the earlier revision passed it.Limits
were not built here.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.