[GH-ISSUE #3543] [Engine] Does not compile with CUDA 13.0–13.2 and VS2019/BuildTools 2019 #1454

Closed
opened 2026-11-04 01:51:24 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @Alois-xx on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3543

Windows 11
RTX 4070 TI 12 GB VRAM
64 GB RAM

find_vcvars accepts VS2019 with CUDA 13.0–13.2, but that combination can't compile the engine's C++20 CUDA sources.

Trying to use VS2019 results in many build errors of the form:

C:/Source/Strata/include\strata/kernels/s_gemv.hpp(15): error: qualified name is not allowed
  namespace strata::kernels {
            ^

C:\Source\Strata\src\kernels\cuda\s_gemv.cu(15): error: qualified name is not allowed
  namespace strata::kernels {
            ^

C:\Source\Strata\src\kernels\cuda\s_gemv.cu(37): error: name followed by "::" must be a class or namespace name
      if (codebook == (int) Codebook::Iq4Nl) return (float) kIq4Nl[code & 0x0F];
                            ^

C:\Source\Strata\src\kernels\cuda\s_gemv.cu(45): error: name followed by "::" must be a class or namespace name
      if (codebook == (int) Codebook::Iq4Nl) return (float) tbl[code & 0x0F];

More from build script:

  > cmd /c C:\Source\Strata\build-strata.bat
-- The CXX compiler identification is MSVC 19.29.30159.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 13.0.88 with host compiler MSVC 19.29.30159.0
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Strata: CUDA enabled, arch 89
-- strata: pack/full/experts.bin absent - the expert arena load test is NOT registered
-- The C compiler identification is MSVC 19.29.30159.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The ASM compiler identification is MSVC
CMake Warning (policy) at C:/Utils/cmake-4.4.4-windows-x86_64/share/cmake-4.4/Modules/CMakeDetermineASMCompiler.cmake:237 (cmake_policy):
  Policy CMP0194 is not set: MSVC is not an assembler for language ASM.  Run
  "cmake --help-policy CMP0194" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  third_party/llama.cpp/ggml/CMakeLists.txt:3 (project)
This warning is for project developers.  Use -Wno-author or -Wno-policy to
suppress it.

-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- CMAKE_GENERATOR_PLATFORM:
-- GGML_SYSTEM_ARCH: x86
-- Including CPU backend
-- x86 detected
-- Adding CPU backend variant ggml-cpu: /arch:AVX2 GGML_AVX2;GGML_FMA;GGML_F16C
-- ggml version: 0.24.0
-- ggml commit:  cbfd5b92
-- trellis MMQ (Gyro prompts): overlay on the pinned ggml-cuda in C:/Source/Strata/build/ggml-tq-overlay
-- Configuring done (6.3s)
-- Generating done (0.2s)
-- Build files have been written to: C:/Source/Strata/build
[1/163] Building CUDA object CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj
FAILED: CMakeFiles/strata_kernels.dir/src/kernels/cuda/route_prior.cu.obj
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin\nvcc.exe" -forward-unknown-to-host-compiler -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.46.2\" -IC:\Source\Strata\third_party\ggml -IC:\Source\Strata\include -isystem "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\include" -isystem "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\include\cccl" -D_WINDOWS -Xcompiler=" /EHsc" -Xcompiler="-O2 -Ob2" -DNDEBUG -std=c++20 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -Xcompiler=-MD -Xcompiler=/W4 -MD -MT CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj -MF CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj.d -x cu -c C:\Source\Strata\src\kernels\cuda\route_prior.cu -o CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj -Xcompiler=-FdCMakeFiles\strata_kernels.dir\strata_kernels.pdb,-FS
C:/Source/Strata/include\strata/kernels/route_prior.hpp(7): error: qualified name is not allowed
  namespace strata::kernels {
            ^

C:\Source\Strata\src\kernels\cuda\route_prior.cu(15): error: qualified name is not allowed
  namespace strata::kernels {
            ^

Originally created by @Alois-xx on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3543 Windows 11 RTX 4070 TI 12 GB VRAM 64 GB RAM find_vcvars accepts VS2019 with CUDA 13.0–13.2, but that combination can't compile the engine's C++20 CUDA sources. Trying to use VS2019 results in many build errors of the form: ``` C:/Source/Strata/include\strata/kernels/s_gemv.hpp(15): error: qualified name is not allowed namespace strata::kernels { ^ C:\Source\Strata\src\kernels\cuda\s_gemv.cu(15): error: qualified name is not allowed namespace strata::kernels { ^ C:\Source\Strata\src\kernels\cuda\s_gemv.cu(37): error: name followed by "::" must be a class or namespace name if (codebook == (int) Codebook::Iq4Nl) return (float) kIq4Nl[code & 0x0F]; ^ C:\Source\Strata\src\kernels\cuda\s_gemv.cu(45): error: name followed by "::" must be a class or namespace name if (codebook == (int) Codebook::Iq4Nl) return (float) tbl[code & 0x0F]; ``` More from build script: ``` > cmd /c C:\Source\Strata\build-strata.bat -- The CXX compiler identification is MSVC 19.29.30159.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The CUDA compiler identification is NVIDIA 13.0.88 with host compiler MSVC 19.29.30159.0 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- Strata: CUDA enabled, arch 89 -- strata: pack/full/experts.bin absent - the expert arena load test is NOT registered -- The C compiler identification is MSVC 19.29.30159.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- The ASM compiler identification is MSVC CMake Warning (policy) at C:/Utils/cmake-4.4.4-windows-x86_64/share/cmake-4.4/Modules/CMakeDetermineASMCompiler.cmake:237 (cmake_policy): Policy CMP0194 is not set: MSVC is not an assembler for language ASM. Run "cmake --help-policy CMP0194" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): third_party/llama.cpp/ggml/CMakeLists.txt:3 (project) This warning is for project developers. Use -Wno-author or -Wno-policy to suppress it. -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF -- CMAKE_SYSTEM_PROCESSOR: AMD64 -- CMAKE_GENERATOR_PLATFORM: -- GGML_SYSTEM_ARCH: x86 -- Including CPU backend -- x86 detected -- Adding CPU backend variant ggml-cpu: /arch:AVX2 GGML_AVX2;GGML_FMA;GGML_F16C -- ggml version: 0.24.0 -- ggml commit: cbfd5b92 -- trellis MMQ (Gyro prompts): overlay on the pinned ggml-cuda in C:/Source/Strata/build/ggml-tq-overlay -- Configuring done (6.3s) -- Generating done (0.2s) -- Build files have been written to: C:/Source/Strata/build [1/163] Building CUDA object CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj FAILED: CMakeFiles/strata_kernels.dir/src/kernels/cuda/route_prior.cu.obj "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin\nvcc.exe" -forward-unknown-to-host-compiler -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.46.2\" -IC:\Source\Strata\third_party\ggml -IC:\Source\Strata\include -isystem "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\include" -isystem "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\include\cccl" -D_WINDOWS -Xcompiler=" /EHsc" -Xcompiler="-O2 -Ob2" -DNDEBUG -std=c++20 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -Xcompiler=-MD -Xcompiler=/W4 -MD -MT CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj -MF CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj.d -x cu -c C:\Source\Strata\src\kernels\cuda\route_prior.cu -o CMakeFiles\strata_kernels.dir\src\kernels\cuda\route_prior.cu.obj -Xcompiler=-FdCMakeFiles\strata_kernels.dir\strata_kernels.pdb,-FS C:/Source/Strata/include\strata/kernels/route_prior.hpp(7): error: qualified name is not allowed namespace strata::kernels { ^ C:\Source\Strata\src\kernels\cuda\route_prior.cu(15): error: qualified name is not allowed namespace strata::kernels { ^ ```
Author
Owner

@github-actions[bot] commented on GitHub (Oct 21, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".
  • Add your graphics card with its VRAM, your RAM and your operating system.

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6308007212 --> @github-actions[bot] commented on GitHub (Oct 21, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". - [ ] Add your graphics card with its VRAM, your RAM and your operating system. Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

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

Thanks — the error output is clear. To pin this down we need: the exact CUDA version (13.0, 13.1 or 13.2), the VS2019 version and MSVC toolset you used, the CMake command, and whether the same tree builds with CUDA 12.x. That separates the compiler from the sources. If you can, add [Engine] to the title.

<!-- gh-comment-id:6337199111 --> @Niko1221 commented on GitHub (Oct 22, 2026): Thanks — the error output is clear. To pin this down we need: the exact CUDA version (13.0, 13.1 or 13.2), the VS2019 version and MSVC toolset you used, the CMake command, and whether the same tree builds with CUDA 12.x. That separates the compiler from the sources. If you can, add [Engine] to the title.
Author
Owner

@Alois-xx commented on GitHub (Oct 23, 2026):

@Niko1221: I have updated the missing details

<!-- gh-comment-id:6359101490 --> @Alois-xx commented on GitHub (Oct 23, 2026): @Niko1221: I have updated the missing details
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6359101837 --> @github-actions[bot] commented on GitHub (Oct 23, 2026): Thanks, this follows the format now.
Author
Owner

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

Fixed for the setup path in 0.2.5: setup.py now asks vswhere for Visual Studio 2022 or newer and stops with a clear message when only 2019 is installed (the C++20 CUDA sources need MSVC 19.30 or later). Your own build-strata.bat is not covered by that check; please use the VS 2022 Build Tools there. We are considering a CMake error for MSVC older than 19.30 so a hand build says it in one line.

<!-- gh-comment-id:6423240773 --> @Niko1221 commented on GitHub (Oct 26, 2026): Fixed for the setup path in 0.2.5: setup.py now asks vswhere for Visual Studio 2022 or newer and stops with a clear message when only 2019 is installed (the C++20 CUDA sources need MSVC 19.30 or later). Your own build-strata.bat is not covered by that check; please use the VS 2022 Build Tools there. We are considering a CMake error for MSVC older than 19.30 so a hand build says it in one line.
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#1454
No description provided.