#5795 [Engine] ROCm build fails due to: `__shared__ alignas(16) int4 ...`
closed · @suvayu · 3 comentarios · En GitHub
AMD / HIPNVIDIA / CUDASecurity
Descripción
## Problem
Strata does not compile with ROCm, with the following build errors:
```
strata/src/kernels/cuda/iq_kernels.cu:2591:16: error: 'alignas' attribute cannot be applied to types
2591 | __shared__ alignas(16) int4 s_u[ED_NC * 2 * ED_XB];
| ^
strata/src/kernels/cuda/iq_kernels.cu:2590:20: warning: comparison of integers of different signs: 'unsigned int' and 'const int' [-Wsign-compare]
2590 | if (blockIdx.y >= ng) return;
| ~~~~~~~~~~ ^ ~~
strata/src/kernels/cuda/iq_kernels.cu:2644:32: warning: unused parameter 'r' [-Wunused-parameter]
2644 | auto term = [&](int k, int r, int c, const typename S::W& w) -> float {
| ^
strata/src/kernels/cuda/iq_kernels.cu:2778:16: error: 'alignas' attribute cannot be applied to types
2778 | __shared__ alignas(16) int4 s_u[ED_NC * 2 * ED_HB];
| ^
```
### Build commands
1. GGML checkout:
```
$ cd ../strata_ggml/
$ git log -1
commit 3cf03257f219afbe7334045ff7c6a06ac68c627d (HEAD, tag: b11062)
Author: Aman Gupta <[email protected]>
Date: Sun Sep 20 16:08:11 2026 +0800
CUDA: enable sparse fa for qwen4 (#28770)
```
2. My build script:
```
declare HIPCXX="$(hipconfig -l)/clang++"
cmake -S . -B build-halo -DCMAKE_BUILD_TYPE=Release \
-DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF \
-DSTRATA_PREFILL_MMQ=ON \
-DSTRATA_GGML_DIR=$HOME/build/strata_ggml \
-DCMAKE_HIP_ARCHITECTURES=gfx1151 \
-DCMAKE_HIP_COMPILER=$HIPCXX \
cmake --build build-halo --target strata
```
## Environment
| | |
|-|-|
| OS | Fedora 44 |
| Hardware | (Strix Halo) AMD RYZEN AI MAX+ 395 w/ Radeon 8060S |
| RAM | 128 GB (VRAM 512 MB, rest GTT) |
| Strata | v0.2.13.1-137-g6c642df7 |
| GGML | 3cf03257 (as pinned in third_party/ggml/VERSION.txt) |
## Additional comments
I'm trying to follow-up on #4589, verified with the latest version of Strata. I also have a fix (#4600) that fixes the issue on ROCm, however I have not verified building with `nvcc` as I do not own an Nvidia device.En el sitio
Enlaces a install, modelos, releases.