[GH-ISSUE #2322] Strata v0.1.44 fails to compile on Linux with CUDA Toolkit 12.1. #935

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

Originally created by @whitespades on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2322

Strata v0.1.44 fails to compile on Linux with CUDA Toolkit 12.1.

Environment:

  • Strata tag: v0.1.44
  • Commit: ed4773eb
  • GPU: RTX 3090 + RTX 3060
  • CUDA architecture: sm_86
  • NVIDIA driver: 595.99.02
  • nvcc: CUDA 12.1, V12.1.105
  • CMake/Ninja build through update.sh

Fatal errors:
src/qwen35/q36_engine.cu:809:
calling a device function "__ushort_as_half(unsigned short)"
from a host function "upload_f32" is not allowed

src/qwen35/q36_engine.cu:814:
same error in upload_f32

The updater retries and correctly retains engine 0.1.43.1.
CUDA 12.1 is detected as supported by setup, but the new
strata_qwen35 target does not compile.

"hercules@Hercules:/Strata/Strata_Linux$ nvcc --version
git rev-parse HEAD
gcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0
ed4773eb7c
gcc (Ubuntu 12.4.0-2ubuntu1
24.04.1) 12.4.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hercules@Hercules:~/Strata/Strata_Linux$
"

Originally created by @whitespades on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2322 Strata v0.1.44 fails to compile on Linux with CUDA Toolkit 12.1. Environment: - Strata tag: v0.1.44 - Commit: ed4773eb - GPU: RTX 3090 + RTX 3060 - CUDA architecture: sm_86 - NVIDIA driver: 595.99.02 - nvcc: CUDA 12.1, V12.1.105 - CMake/Ninja build through update.sh Fatal errors: src/qwen35/q36_engine.cu:809: calling a __device__ function "__ushort_as_half(unsigned short)" from a __host__ function "upload_f32" is not allowed src/qwen35/q36_engine.cu:814: same error in upload_f32 The updater retries and correctly retains engine 0.1.43.1. CUDA 12.1 is detected as supported by setup, but the new strata_qwen35 target does not compile. "hercules@Hercules:~/Strata/Strata_Linux$ nvcc --version git rev-parse HEAD gcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Mon_Apr__3_17:16:06_PDT_2023 Cuda compilation tools, release 12.1, V12.1.105 Build cuda_12.1.r12.1/compiler.32688072_0 ed4773eb7c8f1f1531ba2bc70e0e1987de2661af gcc (Ubuntu 12.4.0-2ubuntu1~24.04.1) 12.4.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. hercules@Hercules:~/Strata/Strata_Linux$ "
Author
Owner

@1472583610 commented on GitHub (Oct 13, 2026):

Same issue with CUDA 12.4.

<!-- gh-comment-id:6155898005 --> @1472583610 commented on GitHub (Oct 13, 2026): Same issue with CUDA 12.4.
Author
Owner

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

Thank you for the exact report (the two line numbers and the toolkit version made this a five-minute find).

Cause: src/qwen35/q36_engine.cu widened fp16 weights in a host function (upload_f32) with __ushort_as_half, which the CUDA 12.0 / 12.1 headers only allow in device code. The fix is nekomario28's PR #2327 (it widens the bits by hand, as bf16_to_f32 does next to it); we checked it against the shared fp16 converter and the F16C hardware for all 65,536 inputs, bit for bit, and kept it as it is.

We reproduced your build: CUDA 12.1.1 + GCC 12.4.0 (Ubuntu 24.04, sm_86, all 408 targets with the tests) gives exactly your two errors on v0.1.44 and none with the fix. CUDA 12.0.1 builds it too.

The fix is in 0.1.44.1. ./update.sh will build it (it replaces 0.1.43.1 only when the build succeeds, as you saw). If anything else in the build fails on your toolkit, please post the first error and we will fix it the same way.

<!-- gh-comment-id:6157931330 --> @Niko1221 commented on GitHub (Oct 14, 2026): Thank you for the exact report (the two line numbers and the toolkit version made this a five-minute find). Cause: `src/qwen35/q36_engine.cu` widened fp16 weights in a host function (`upload_f32`) with `__ushort_as_half`, which the CUDA 12.0 / 12.1 headers only allow in device code. The fix is nekomario28's PR #2327 (it widens the bits by hand, as `bf16_to_f32` does next to it); we checked it against the shared fp16 converter and the F16C hardware for all 65,536 inputs, bit for bit, and kept it as it is. We reproduced your build: CUDA 12.1.1 + GCC 12.4.0 (Ubuntu 24.04, sm_86, all 408 targets with the tests) gives exactly your two errors on v0.1.44 and none with the fix. CUDA 12.0.1 builds it too. The fix is in 0.1.44.1. `./update.sh` will build it (it replaces 0.1.43.1 only when the build succeeds, as you saw). If anything else in the build fails on your toolkit, please post the first error and we will fix it the same way.
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#935
No description provided.