[GH-ISSUE #4023] [Engine] The hand build in docs/INSTALL.md fails on RTX 50, and without the option it builds for sm_75 #1734

Closed
opened 2026-11-04 01:53:34 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @pschaub on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4023

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

I wanted to build the engine myself on Windows and followed "Only compile, without the installer" in docs/INSTALL.md:

github.com/Niko1221/Strata@7dd5cf18e6/docs/INSTALL.md (L187-L190)

Configuring works. The second command, cmake --build, stops in src/prefill/mmq_nvfp4_w4a4.cu on my RTX 5090:

ptxas mmq_nvfp4_w4a4.ptx, line 40170; error   : Instruction 'mma with block scale' not supported on .target 'sm_120'

So I tried it without -DCMAKE_CUDA_ARCHITECTURES, since CMakeLists.txt has 120 as its default. That build goes through, but CMake prints Strata: CUDA enabled, arch 75 and build.ninja only has compute_75. The engine started on the 5090 without a warning, and then requests failed with prefill copy_i32: unspecified launch failure. A build for 120 runs fine on the same PC with the same settings.

What I found: the 120 default comes after enable_language(CUDA). Since CMake 3.18 (policy CMP0104), enable_language(CUDA) already fills an unset CMAKE_CUDA_ARCHITECTURES with the compiler's default, which is 75 for CUDA 13, so the if(NOT DEFINED ...) never fires:

github.com/Niko1221/Strata@7dd5cf18e6/CMakeLists.txt (L177-L184)

This doesn't depend on the card. I get the same arch 75 on Linux with no GPU at all (CMake 3.28, nvcc 13.4). For an RTX 20 card 75 happens to be right. RTX 30, 40 and 50 cards can only run that build through the driver's JIT, and I could only try that on my 5090. The release packages are not affected, because their build script sets the architectures explicitly:

github.com/Niko1221/Strata@7dd5cf18e6/packaging/build_cuda_linux.sh (L19)

The native error comes from the W4A4 unit. It turns 12x into 12xa, but only plain numbers, so native stays native and the unit is built for sm_120 without the a, where ptxas refuses the FP4 MMA:

github.com/Niko1221/Strata@7dd5cf18e6/CMakeLists.txt (L1881-L1889)

Only cards with compute capability 12.x, like RTX 50, hit this. On RTX 20, 30 and 40 native gives 75, 86 or 89, and the FP4 code in that unit is only compiled from 12.0 on (BLACKWELL_MMA_AVAILABLE in ggml's common.cuh).

The fix looks small and I have it ready as a PR: set the 120 default before enable_language(CUDA) (unless CUDAARCHS is set), resolve native before the 12xa rewrite, and let the command in docs/INSTALL.md name the card like the release build does (120 for RTX 50, 75, 86 or 89 for RTX 20, 30 or 40). On my 5090 no option then gives arch 120 and runs fine, and native builds. One side effect: without the option an RTX 20, 30 or 40 then gets 120 too, so the engine should stop at start with its existing "this engine has no code for ... rebuild it for this card" message (src/core/device.cu). I couldn't try that on such a card.

Smallest steps or command that reproduce it

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native
cmake --build build --target strata -j8

On an RTX 50 this stops in mmq_nvfp4_w4a4.cu. Without the option:

cmake -S . -B build2 -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON

prints Strata: CUDA enabled, arch 75 (no GPU needed for this part).

Reproduction status

Reproduced locally

Strata version

main 7dd5cf18 (0.2.4.2)

Graphics card, memory and system

My setup: main 7dd5cf18, RTX 5090 32 GB, driver 621.01, 64 GB RAM, Windows 11, MSVC 19.44, CUDA 13.4, CMake 3.31, Ninja

Model, size and settings

No response

Logs

No response

Originally created by @pschaub on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4023 ### Area [Engine] (speed, kernels, models, the server and API) ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### What happened I wanted to build the engine myself on Windows and followed "Only compile, without the installer" in docs/INSTALL.md: https://github.com/Niko1221/Strata/blob/7dd5cf18e68c639a8773e096c5c79f971ea2a9f5/docs/INSTALL.md?plain=1#L187-L190 Configuring works. The second command, `cmake --build`, stops in `src/prefill/mmq_nvfp4_w4a4.cu` on my RTX 5090: ``` ptxas mmq_nvfp4_w4a4.ptx, line 40170; error : Instruction 'mma with block scale' not supported on .target 'sm_120' ``` So I tried it without `-DCMAKE_CUDA_ARCHITECTURES`, since CMakeLists.txt has 120 as its default. That build goes through, but CMake prints `Strata: CUDA enabled, arch 75` and build.ninja only has `compute_75`. The engine started on the 5090 without a warning, and then requests failed with `prefill copy_i32: unspecified launch failure`. A build for 120 runs fine on the same PC with the same settings. What I found: the 120 default comes after `enable_language(CUDA)`. Since CMake 3.18 (policy CMP0104), `enable_language(CUDA)` already fills an unset `CMAKE_CUDA_ARCHITECTURES` with the compiler's default, which is 75 for CUDA 13, so the `if(NOT DEFINED ...)` never fires: https://github.com/Niko1221/Strata/blob/7dd5cf18e68c639a8773e096c5c79f971ea2a9f5/CMakeLists.txt#L177-L184 This doesn't depend on the card. I get the same `arch 75` on Linux with no GPU at all (CMake 3.28, nvcc 13.4). For an RTX 20 card 75 happens to be right. RTX 30, 40 and 50 cards can only run that build through the driver's JIT, and I could only try that on my 5090. The release packages are not affected, because their build script sets the architectures explicitly: https://github.com/Niko1221/Strata/blob/7dd5cf18e68c639a8773e096c5c79f971ea2a9f5/packaging/build_cuda_linux.sh#L19 The `native` error comes from the W4A4 unit. It turns 12x into 12xa, but only plain numbers, so `native` stays `native` and the unit is built for sm_120 without the `a`, where ptxas refuses the FP4 MMA: https://github.com/Niko1221/Strata/blob/7dd5cf18e68c639a8773e096c5c79f971ea2a9f5/CMakeLists.txt#L1881-L1889 Only cards with compute capability 12.x, like RTX 50, hit this. On RTX 20, 30 and 40 `native` gives 75, 86 or 89, and the FP4 code in that unit is only compiled from 12.0 on ([`BLACKWELL_MMA_AVAILABLE` in ggml's common.cuh](https://github.com/ggml-org/llama.cpp/blob/3cf03257f219afbe7334045ff7c6a06ac68c627d/ggml/src/ggml-cuda/common.cuh#L296-L298)). The fix looks small and I have it ready as a PR: set the 120 default before `enable_language(CUDA)` (unless `CUDAARCHS` is set), resolve `native` before the 12xa rewrite, and let the command in docs/INSTALL.md name the card like the release build does (`120` for RTX 50, `75`, `86` or `89` for RTX 20, 30 or 40). On my 5090 no option then gives `arch 120` and runs fine, and `native` builds. One side effect: without the option an RTX 20, 30 or 40 then gets 120 too, so the engine should stop at start with its existing "this engine has no code for ... rebuild it for this card" message ([src/core/device.cu](https://github.com/Niko1221/Strata/blob/7dd5cf18e68c639a8773e096c5c79f971ea2a9f5/src/core/device.cu#L243-L254)). I couldn't try that on such a card. ### Smallest steps or command that reproduce it ``` cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native cmake --build build --target strata -j8 ``` On an RTX 50 this stops in `mmq_nvfp4_w4a4.cu`. Without the option: ``` cmake -S . -B build2 -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON ``` prints `Strata: CUDA enabled, arch 75` (no GPU needed for this part). ### Reproduction status Reproduced locally ### Strata version main 7dd5cf18 (0.2.4.2) ### Graphics card, memory and system My setup: main 7dd5cf18, RTX 5090 32 GB, driver 621.01, 64 GB RAM, Windows 11, MSVC 19.44, CUDA 13.4, CMake 3.31, Ninja ### Model, size and settings _No response_ ### Logs _No response_
Author
Owner

@Niko1221 commented on GitHub (Oct 27, 2026):

Thank you for the report, your diagnosis was right. It is fixed in 0.2.7 by the change from #4029: a build with no -DCMAKE_CUDA_ARCHITECTURES now targets sm_120, and native builds the FP4 unit for the card's real architecture. The release packages were never affected; this was the hand build. We checked the configure output (no option, CUDAARCHS set, an explicit architecture, native) and a native build on an sm_86 machine, but we have no RTX 50 card for the native build. Could you build 0.2.7 the way docs/INSTALL.md says and tell us whether it configures and starts? We close this issue when you confirm.

Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7

<!-- gh-comment-id:6446125265 --> @Niko1221 commented on GitHub (Oct 27, 2026): Thank you for the report, your diagnosis was right. It is fixed in 0.2.7 by the change from #4029: a build with no -DCMAKE_CUDA_ARCHITECTURES now targets sm_120, and `native` builds the FP4 unit for the card's real architecture. The release packages were never affected; this was the hand build. We checked the configure output (no option, CUDAARCHS set, an explicit architecture, native) and a native build on an sm_86 machine, but we have no RTX 50 card for the native build. Could you build 0.2.7 the way docs/INSTALL.md says and tell us whether it configures and starts? We close this issue when you confirm. Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
Author
Owner

@pschaub commented on GitHub (Oct 27, 2026):

Thanks for picking this up in 0.2.7. I built it from source on my RTX 5090 with the two commands from docs/SOURCE_INSTALL.md

Works here, so from my side this can be closed.

<!-- gh-comment-id:6453534039 --> @pschaub commented on GitHub (Oct 27, 2026): Thanks for picking this up in 0.2.7. I built it from source on my RTX 5090 with the two commands from docs/SOURCE_INSTALL.md Works here, so from my side this can be closed.
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#1734
No description provided.