mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4151] [Engine] gfx906/HIP: __shared__ alignas(16) int4 does not compile (clang 18 / ROCm 6.3.3) #4923
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#4923
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/4151
Author: @ken2425pm
Created: 10/25/2026
Status: 🔄 Open
Base:
main← Head:fix-hip633-build📝 Commits (1)
ee6419dgfx906: map__shared__ alignas(16) int4onto the attribute form on HIP📊 Changes
1 file changed (+9 additions, -2 deletions)
View changed files
📝
src/kernels/cuda/iq_kernels.cu(+9 -2)📄 Description
Replaces the same-numbered closed PR (0.2.0-beta tracker reset; its /reopen check passed but GitHub would not reopen the closed PR after the branch update - new PR per the check bot's guidance).
Problem and result: on ROCm 6.3.3 (clang 18) the gfx906 build stops in
src/kernels/cuda/iq_kernels.cu—error: 'alignas' attribute cannot be applied to typesat the two expdec kernels'__shared__ alignas(16) int4staging tiles. After this change that error is gone.Related discussion: #2459 (the build thread; the closed #3078 was rescoped after the 0.2.0-beta tracker reset), #3172 (same-class compat gaps, dflash2.cpp), #2460 (the cublas maps — merged upstream in 0.2.1, not touched here).
Approach: the
uint32_tmacro right above (STRATA_SHARED_ALIGN16_U32) already handles this exact class for HIP; the two int4 tiles get the same treatment.STRATA_SHARED_ALIGN16_INT4keeps the CUDA spelling and takes__attribute__((aligned(16)))under HIPCC. Two call sites change spelling; no behaviour change on CUDA — the macro's CUDA branch is the previous text.Validation:
/opt/rocm-6.3.3, clang 18), gfx906, the pinned ggml as cmake fetches it (3cf03257f): without the changeninja -C build-906 stratafails atiq_kernels.cu:2477and:2664only; with this and thedflash2.cppstream-priority mapping reported in #3172, the build links —[5/5] Linking HIP executable strata, 35.7 MB.-Werrorbuild (the build is not-Werrorand carries the upstream warning set).Limits: the second link blocker (
dflash2.cpp, two compat lines) is reported with a fix offered in #3172 — left to that thread so this PR stays one change. The earlier #3078 commits that 0.2.x made obsolete (q36_engine__ldg/__half_as_ushort, thecudaInitDeviceguard, the qsa sm_80 gate) are dropped — upstream now covers or no-longer-compiles each (qwen35 is not part of the v0.2.6 gfx906 build).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.