[GH-ISSUE #4503] [Other] v0.2.7 source build with CUDA 12.0 fails: "Formal parameter space overflowed" in src/prefill/moe_fused_iq.cu (the WideBatch kernels) #2021

Closed
opened 2026-11-04 01:56:01 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @rodi4eg on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4503

Area

[Other] (build / installation)

Desktop app, Terminal or source?

Source (a plain cmake build of v0.2.7 on Linux)

What happened

A source build of v0.2.7 stops at [127/173] — FAILED: [code=1] CMakeFiles/strata_mmq.dir/src/prefill/moe_fused_iq.cu.o — when the CUDA toolkit is this box's apt-installed nvidia-cuda-toolkit (nvcc 12.0):

<repo>/src/prefill/moe_fused_iq.cu(565): Error: Formal parameter space overflowed (4216 bytes required, max 4096 bytes allowed)
 in function _ZN6strata7prefill5fused48_GLOBAL__N__06844d19_15_moe_fused_iq_cu_7f62d4d813native_kernelILi16ELb1ELi2ELi…
<repo>/src/prefill/moe_fused_iq.cu(908): Error: Formal parameter space overflowed (4216 bytes required, max 4096 bytes allowed)
 in function …_native_ws_kernelI…

27 such lines in total: 18 at src/prefill/moe_fused_iq.cu:565 (native_kernel's declaration line) and 9 at :908 (native_ws_kernel(const WideBatch b, …)); all 27 mangled signatures mention WideBatch. The nvcc line is the project's own, with --generate-code=arch=compute_89,code=[compute_89,sm_89].

The same source tree compiled by a CUDA 12.9 toolkit (nvcc 12.9.86) installed side by side gives RC 0 for that file, so it is the toolkit's 4096-byte formals limit, not a change on my side. src/prefill/moe_fused_iq.cu is part of target strata_mmq (CMakeLists.txt:2070).

Expected instead: either the build works with 12.0, or the failure says "this toolkit is too old, install CUDA 12.9" before ~25 minutes of compiling are spent.

Smallest steps or command that reproduce it

# Ubuntu 24.04.4 LTS: apt install nvidia-cuda-toolkit  ->  /usr/bin/nvcc = "release 12.0, V12.0.140"
cmake -S <repo> -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_CUDA_ARCHITECTURES=89 -DCMAKE_CUDA_COMPILER=/usr/bin/nvcc \
      -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=ON
cmake --build build -j 8          # dies at [134/173], target strata_mmq, 27 errors above

Then the same configure pointed at a CUDA 12.9 toolkit installed side by side (-DCMAKE_CUDA_COMPILER=<that toolkit's nvcc>, no system package touched) builds clean.

Reproduction status

Reproduced locally — the build failed as pasted above (kept in my own build log of that run), and the same translation unit compiles with RC 0 under nvcc 12.9.86 in the same tree, on the same card. I did not bisect which 12.x first works: 12.0 fails, 12.9 compiles it.

Strata version

Strata 0.2.7 · engine 0.1.52 (source build from the repo's v0.2.7 tag). My tree adds 9 files of my own work on top of that tag; none of them is in target strata_mmq and none touches src/prefill/ — the failing translation unit is upstream's, unmodified by me.

Graphics card, memory and system

RTX 4070 (compute capability 8.9) 12 GB · 31 GB RAM · Ubuntu 24.04.4 LTS, driver 580.126.09. Toolkit: nvidia-cuda-toolkit package 12.0.140~12.0.1-4build4, i.e. /usr/bin/nvcc = Cuda compilation tools, release 12.0, V12.0.140. That version is the apt candidate on this box (noble/multiverse), so anyone who follows the source instructions after apt install nvidia-cuda-toolkit with no other CUDA install lands on it.

Model, size and settings

Not relevant: nothing loads, the failure is at compile time.

Logs

All 27 error lines are identical apart from the mangled function name; one of each kind is quoted above. No keys or private text in them. I can paste the whole failing nvcc command line (it is the project's own flags plus ~900 characters of -D defines, nothing local) if wanted — it is kept in my own build log of that run rather than here for length.

What I would ask for

  1. A version floor where one already exists. setup.py:5531 already encodes a toolkit floor for the CUDA-12 engine (need12 = (12, 8) if max(archs) >= 120 else (12, 0)) and fails with an install hint at setup.py:5536-5541. For a modern card the floor used at setup.py:5543 is (12, 0), so a CUDA 12.0 toolkit passes setup, prints build tools present (CUDA 12.0) and then dies 80 % through the build. Raising that floor for source builds — to the 12.9 upstream documents (Dockerfile:8; the default is CUDA 13 at Dockerfile:20) — reuses machinery that is already there. A find_package(CUDAToolkit) check in CMake with the same message would cover people who configure directly, as I did.
  2. One line in the docs. docs/SOURCE_INSTALL.md states no CUDA toolkit version requirement for an NVIDIA build (only the Visual Studio constraints at :40-41), and docs/TROUBLESHOOTING.md:212-217 already lists two known toolkit mismatches (unsupported GNU version, glibc 2.43 with CUDA 12.9) with STRATA_NVCC=<its nvcc> as the fix — a third entry "toolkit 12.0 is too old for the WideBatch prefill kernels, use 12.9 or 13.x" fits that list exactly.
  3. Prior art in this repo: #2322 ("v0.1.44 fails to compile on Linux with CUDA Toolkit 12.1", closed) and #601 / #2576 (toolkit-vs-compiler handling). gh search issues --repo Niko1221/Strata "Formal parameter space" returns nothing today, so this specific error is not tracked.

For completeness about my box: I worked around it with a CUDA 12.9 toolkit in a private prefix (STRATA_NVCC=<its nvcc> is honoured at setup.py:2100, documented in docs/OLDER_GPUS.md:109), and my installed engine now resolves its CUDA runtime through that prefix, so the toolkit choice is not throwaway for me — which is why the early message matters more than the workaround.

Originally created by @rodi4eg on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4503 ### Area [Other] (build / installation) ### Desktop app, Terminal or source? Source (a plain cmake build of v0.2.7 on Linux) ### What happened A source build of v0.2.7 stops at `[127/173]` — `FAILED: [code=1] CMakeFiles/strata_mmq.dir/src/prefill/moe_fused_iq.cu.o` — when the CUDA toolkit is this box's apt-installed `nvidia-cuda-toolkit` (nvcc 12.0): ``` <repo>/src/prefill/moe_fused_iq.cu(565): Error: Formal parameter space overflowed (4216 bytes required, max 4096 bytes allowed) in function _ZN6strata7prefill5fused48_GLOBAL__N__06844d19_15_moe_fused_iq_cu_7f62d4d813native_kernelILi16ELb1ELi2ELi… <repo>/src/prefill/moe_fused_iq.cu(908): Error: Formal parameter space overflowed (4216 bytes required, max 4096 bytes allowed) in function …_native_ws_kernelI… ``` 27 such lines in total: 18 at `src/prefill/moe_fused_iq.cu:565` (`native_kernel`'s declaration line) and 9 at `:908` (`native_ws_kernel(const WideBatch b, …)`); all 27 mangled signatures mention `WideBatch`. The nvcc line is the project's own, with `--generate-code=arch=compute_89,code=[compute_89,sm_89]`. The same source tree compiled by a CUDA 12.9 toolkit (nvcc 12.9.86) installed side by side gives RC 0 for that file, so it is the toolkit's 4096-byte formals limit, not a change on my side. `src/prefill/moe_fused_iq.cu` is part of target `strata_mmq` (`CMakeLists.txt:2070`). Expected instead: either the build works with 12.0, or the failure says "this toolkit is too old, install CUDA 12.9" before ~25 minutes of compiling are spent. ### Smallest steps or command that reproduce it ```bash # Ubuntu 24.04.4 LTS: apt install nvidia-cuda-toolkit -> /usr/bin/nvcc = "release 12.0, V12.0.140" cmake -S <repo> -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CUDA_ARCHITECTURES=89 -DCMAKE_CUDA_COMPILER=/usr/bin/nvcc \ -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=ON cmake --build build -j 8 # dies at [134/173], target strata_mmq, 27 errors above ``` Then the same configure pointed at a CUDA 12.9 toolkit installed side by side (`-DCMAKE_CUDA_COMPILER=<that toolkit's nvcc>`, no system package touched) builds clean. ### Reproduction status Reproduced locally — the build failed as pasted above (kept in my own build log of that run), and the same translation unit compiles with RC 0 under nvcc 12.9.86 in the same tree, on the same card. I did **not** bisect which 12.x first works: 12.0 fails, 12.9 compiles it. ### Strata version Strata 0.2.7 · engine 0.1.52 (source build from the repo's `v0.2.7` tag). My tree adds 9 files of my own work on top of that tag; none of them is in target `strata_mmq` and none touches `src/prefill/` — the failing translation unit is upstream's, unmodified by me. ### Graphics card, memory and system RTX 4070 (compute capability 8.9) 12 GB · 31 GB RAM · Ubuntu 24.04.4 LTS, driver 580.126.09. Toolkit: `nvidia-cuda-toolkit` package `12.0.140~12.0.1-4build4`, i.e. `/usr/bin/nvcc` = `Cuda compilation tools, release 12.0, V12.0.140`. That version is the apt candidate on this box (`noble/multiverse`), so anyone who follows the source instructions after `apt install nvidia-cuda-toolkit` with no other CUDA install lands on it. ### Model, size and settings Not relevant: nothing loads, the failure is at compile time. ### Logs All 27 error lines are identical apart from the mangled function name; one of each kind is quoted above. No keys or private text in them. I can paste the whole failing nvcc command line (it is the project's own flags plus ~900 characters of `-D` defines, nothing local) if wanted — it is kept in my own build log of that run rather than here for length. ### What I would ask for 1. **A version floor where one already exists.** `setup.py:5531` already encodes a toolkit floor for the CUDA-12 engine (`need12 = (12, 8) if max(archs) >= 120 else (12, 0)`) and fails with an install hint at `setup.py:5536-5541`. For a modern card the floor used at `setup.py:5543` is `(12, 0)`, so a CUDA 12.0 toolkit passes setup, prints `build tools present (CUDA 12.0)` and then dies 80 % through the build. Raising that floor for source builds — to the 12.9 upstream documents (`Dockerfile:8`; the default is CUDA 13 at `Dockerfile:20`) — reuses machinery that is already there. A `find_package(CUDAToolkit)` check in CMake with the same message would cover people who configure directly, as I did. 2. **One line in the docs.** `docs/SOURCE_INSTALL.md` states no CUDA toolkit version requirement for an NVIDIA build (only the Visual Studio constraints at `:40-41`), and `docs/TROUBLESHOOTING.md:212-217` already lists two known toolkit mismatches (`unsupported GNU version`, glibc 2.43 with CUDA 12.9) with `STRATA_NVCC=<its nvcc>` as the fix — a third entry "toolkit 12.0 is too old for the WideBatch prefill kernels, use 12.9 or 13.x" fits that list exactly. 3. Prior art in this repo: #2322 ("v0.1.44 fails to compile on Linux with CUDA Toolkit 12.1", closed) and #601 / #2576 (toolkit-vs-compiler handling). `gh search issues --repo Niko1221/Strata "Formal parameter space"` returns nothing today, so this specific error is not tracked. For completeness about my box: I worked around it with a CUDA 12.9 toolkit in a private prefix (`STRATA_NVCC=<its nvcc>` is honoured at `setup.py:2100`, documented in `docs/OLDER_GPUS.md:109`), and my installed engine now resolves its CUDA runtime through that prefix, so the toolkit choice is not throwaway for me — which is why the early message matters more than the workaround.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660566782 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2021
No description provided.