[GH-ISSUE #3368] [Other] error detected in the compilation of Strata/src/qwen35/q36_engine.cu #1366

Closed
opened 2026-11-04 01:50:43 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @Anceloth on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3368

Problem:

  • After pull request on Oct-19: 22:00:00 - the compilation is failing when it is trying to Build the CUDA object CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o

  • I started with "./setup --setup" and choose the original model "Qwen3.8-Flash-Next GSQ-RCO quants by ISTA-DASLab - the original model", and after some seconds it show an error:

/path/to/repo/Strata/src/qwen35/q36_engine.cu(1659): error: calling a __device__ function("__half_as_ushort(    ::__half)") from a __host__ function("verify_q8") is not allowed

1 error detected in the compilation of "/path/to/repo/Strata/src/qwen35/q36_engine.cu".
ninja: build stopped: subcommand failed.

 [X]  command failed (exit 2): cmake

Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.
  • The thing is that the model worked before the pull request. I went back to commit 4c968e61999d237caed3139e6a714d0de52afe82 with description : gdn chunk / Volta recurrence: name the kernels in every device pass (wmma body ..... and I could run the model

Environment:

  • Ubuntu 24.04,
  • GPU RTX 2000 Ada Generation Laptop GPU, 8 GB, - CUDA 13.2
  • 64 RAM,
  • i7 13th

Reproduce:

  • run ./setup --setup
  • choose : 1) Qwen3.8-Flash-Next

FAIL

Expected:

  • Go through the setup process as usual and run the model

Evidence: -- log Extended

/path/to/repo/Strata/src/prefill/moe_fused_iq.cu(1331): warning #177-D: function "strata::prefill::fused::<unnamed>::f16_d" was declared but never referenced

[5/21] Building CUDA object CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o
FAILED: [code=2] CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o 
/usr/bin/nvcc -forward-unknown-to-host-compiler -DSTRATA_NATIVE_EXPERTS=1 -DSTRATA_PREFILL_FUSED=1 -DSTRATA_PREFILL_MMQ=1 -DSTRATA_Q36_CPU_POOL=1 -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.45.3\" -I/path/to/repo/Strata/include -I/path/to/repo/Strata/third_party/llama.cpp/ggml/src/../include -O3 -DNDEBUG -std=c++20 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -MD -MT CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o -MF CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o.d -x cu -c /path/to/repo/Strata/src/qwen35/q36_engine.cu -o CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o
/path/to/repo/Strata/include/strata/core/family_layout.hpp(100): warning #811-D: const variable "c" requires an initializer -- class "strata::core::ModelGeometry" has no user-provided default constructor

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/path/to/repo/Strata/src/qwen35/q36_engine.cu(1659): error: calling a __device__ function("__half_as_ushort(    ::__half)") from a __host__ function("verify_q8") is not allowed

1 error detected in the compilation of "/path/to/repo/Strata/src/qwen35/q36_engine.cu".
[18/21] Building CUDA object CMakeFiles/strata_mmq.dir/ggml-tq-overlay/template-instances/mmq-instance-tqk6.cu.o
ninja: build stopped: subcommand failed.
  (the build stopped - trying it once more)
  > /usr/bin/cmake --build /path/to/repo/Strata/build --target strata -j 14
[2/4] Building CUDA object CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o
FAILED: [code=2] CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o 
/usr/bin/nvcc -forward-unknown-to-host-compiler -DSTRATA_NATIVE_EXPERTS=1 -DSTRATA_PREFILL_FUSED=1 -DSTRATA_PREFILL_MMQ=1 -DSTRATA_Q36_CPU_POOL=1 -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.45.3\" -I/path/to/repo/Strata/include -I/path/to/repo/Strata/third_party/llama.cpp/ggml/src/../include -O3 -DNDEBUG -std=c++20 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -MD -MT CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o -MF CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o.d -x cu -c /path/to/repo/Strata/src/qwen35/q36_engine.cu -o CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o
/path/to/repo/Strata/include/strata/core/family_layout.hpp(100): warning #811-D: const variable "c" requires an initializer -- class "strata::core::ModelGeometry" has no user-provided default constructor

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/path/to/repo/Strata/src/qwen35/q36_engine.cu(1659): error: calling a __device__ function("__half_as_ushort(    ::__half)") from a __host__ function("verify_q8") is not allowed

1 error detected in the compilation of "/path/to/repo/Strata/src/qwen35/q36_engine.cu".
ninja: build stopped: subcommand failed.

  [X]  command failed (exit 2): cmake

Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.

Thank you in advance

Originally created by @Anceloth on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3368 # Problem: * After pull request on Oct-19: 22:00:00 - the compilation is failing when it is trying to Build the CUDA object CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o * I started with "./setup --setup" and choose the original model "_Qwen3.8-Flash-Next GSQ-RCO quants by ISTA-DASLab - the original model_", and after some seconds it show an error: ```bash /path/to/repo/Strata/src/qwen35/q36_engine.cu(1659): error: calling a __device__ function("__half_as_ushort( ::__half)") from a __host__ function("verify_q8") is not allowed 1 error detected in the compilation of "/path/to/repo/Strata/src/qwen35/q36_engine.cu". ninja: build stopped: subcommand failed. [X] command failed (exit 2): cmake Setup stopped. Fix the item above and run it again - everything already done is kept and skipped. ``` * The thing is that the model worked before the pull request. I went back to commit `4c968e61999d237caed3139e6a714d0de52afe82` with description : `gdn chunk / Volta recurrence: name the kernels in every device pass (wmma body .....` and I could run the model # Environment: * Ubuntu 24.04, * GPU RTX 2000 Ada Generation Laptop GPU, 8 GB, - CUDA 13.2 * 64 RAM, * i7 13th # Reproduce: * run `./setup --setup` * choose : 1) Qwen3.8-Flash-Next FAIL # Expected: * Go through the setup process as usual and run the model # Evidence: -- log Extended ```bash /path/to/repo/Strata/src/prefill/moe_fused_iq.cu(1331): warning #177-D: function "strata::prefill::fused::<unnamed>::f16_d" was declared but never referenced [5/21] Building CUDA object CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o FAILED: [code=2] CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o /usr/bin/nvcc -forward-unknown-to-host-compiler -DSTRATA_NATIVE_EXPERTS=1 -DSTRATA_PREFILL_FUSED=1 -DSTRATA_PREFILL_MMQ=1 -DSTRATA_Q36_CPU_POOL=1 -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.45.3\" -I/path/to/repo/Strata/include -I/path/to/repo/Strata/third_party/llama.cpp/ggml/src/../include -O3 -DNDEBUG -std=c++20 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -MD -MT CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o -MF CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o.d -x cu -c /path/to/repo/Strata/src/qwen35/q36_engine.cu -o CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o /path/to/repo/Strata/include/strata/core/family_layout.hpp(100): warning #811-D: const variable "c" requires an initializer -- class "strata::core::ModelGeometry" has no user-provided default constructor Remark: The warnings can be suppressed with "-diag-suppress <warning-number>" /path/to/repo/Strata/src/qwen35/q36_engine.cu(1659): error: calling a __device__ function("__half_as_ushort( ::__half)") from a __host__ function("verify_q8") is not allowed 1 error detected in the compilation of "/path/to/repo/Strata/src/qwen35/q36_engine.cu". [18/21] Building CUDA object CMakeFiles/strata_mmq.dir/ggml-tq-overlay/template-instances/mmq-instance-tqk6.cu.o ninja: build stopped: subcommand failed. (the build stopped - trying it once more) > /usr/bin/cmake --build /path/to/repo/Strata/build --target strata -j 14 [2/4] Building CUDA object CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o FAILED: [code=2] CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o /usr/bin/nvcc -forward-unknown-to-host-compiler -DSTRATA_NATIVE_EXPERTS=1 -DSTRATA_PREFILL_FUSED=1 -DSTRATA_PREFILL_MMQ=1 -DSTRATA_Q36_CPU_POOL=1 -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.45.3\" -I/path/to/repo/Strata/include -I/path/to/repo/Strata/third_party/llama.cpp/ggml/src/../include -O3 -DNDEBUG -std=c++20 "--generate-code=arch=compute_89,code=[compute_89,sm_89]" -MD -MT CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o -MF CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o.d -x cu -c /path/to/repo/Strata/src/qwen35/q36_engine.cu -o CMakeFiles/strata_qwen35.dir/src/qwen35/q36_engine.cu.o /path/to/repo/Strata/include/strata/core/family_layout.hpp(100): warning #811-D: const variable "c" requires an initializer -- class "strata::core::ModelGeometry" has no user-provided default constructor Remark: The warnings can be suppressed with "-diag-suppress <warning-number>" /path/to/repo/Strata/src/qwen35/q36_engine.cu(1659): error: calling a __device__ function("__half_as_ushort( ::__half)") from a __host__ function("verify_q8") is not allowed 1 error detected in the compilation of "/path/to/repo/Strata/src/qwen35/q36_engine.cu". ninja: build stopped: subcommand failed. [X] command failed (exit 2): cmake Setup stopped. Fix the item above and run it again - everything already done is kept and skipped. ``` -------------- ## Thank you in advance
bsakaguchi 2026-11-04 01:50:43 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 20, 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".

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:6284288628 --> @github-actions[bot] commented on GitHub (Oct 20, 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". 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

@yudhanjaya commented on GitHub (Oct 20, 2026):

Found the cause: verify_q8 in src/qwen35/q36_engine.cu (the STRATA_Q36_VERIFY=1 debug print) calls __half_as_ushort, which is __device__-only in CUDA 12.0/12.1, from host code.

Seems to be the same error as the closed #2926. I had Claude build a 4-line fix (copy the half's bits with memcpy) - the fix is in https://github.com/Niko1221/Strata/pull/3374. It builds with nvcc 12.0.140 for sm_86/sm_89; I did not test HIP/SYCL.

I'm running a 4080 Super and a 3060, for reference.

<!-- gh-comment-id:6284774020 --> @yudhanjaya commented on GitHub (Oct 20, 2026): Found the cause: `verify_q8` in `src/qwen35/q36_engine.cu` (the `STRATA_Q36_VERIFY=1` debug print) calls `__half_as_ushort`, which is `__device__`-only in CUDA 12.0/12.1, from host code. Seems to be the same error as the closed #2926. I had Claude build a 4-line fix (copy the half's bits with `memcpy`) - the fix is in https://github.com/Niko1221/Strata/pull/3374. It builds with nvcc 12.0.140 for sm_86/sm_89; I did not test HIP/SYCL. I'm running a 4080 Super and a 3060, for reference.
Author
Owner

@Anceloth commented on GitHub (Oct 20, 2026):

7. Found the cause: verify_q8 in src/qwen35/q36_engine.cu (the STRATA_Q36_VERIFY=1 debug print) calls __half_as_ushort, which is __device__-only in CUDA 12.0/12.1, from host code.
Seems to be the same error as the closed #2926. I had Claude build a 4-line fix (copy the half's bits with memcpy) - the fix is in #3374. It builds with nvcc 12.0.140 for sm_86/sm_89; I did not test HIP/SYCL.
I'm running a 4080 Super and a 3060, for reference.

I didn´t wait to your fix [https://github.com/Niko1221/Strata/pull/3374] to be merged, and I've applied it manually... It works well for this issue on : GPU RTX 2000 Ada Generation Laptop - CUDA 13.2

Thank you

<!-- gh-comment-id:6295908527 --> @Anceloth commented on GitHub (Oct 20, 2026): > 7\. Found the cause: `verify_q8` in `src/qwen35/q36_engine.cu` (the `STRATA_Q36_VERIFY=1` debug print) calls `__half_as_ushort`, which is `__device__`-only in CUDA 12.0/12.1, from host code. > Seems to be the same error as the closed [#2926](https://github.com/Niko1221/Strata/issues/2926). I had Claude build a 4-line fix (copy the half's bits with `memcpy`) - the fix is in [#3374](https://github.com/Niko1221/Strata/pull/3374). It builds with nvcc 12.0.140 for sm_86/sm_89; I did not test HIP/SYCL. > I'm running a 4080 Super and a 3060, for reference. I didn´t wait to your fix [https://github.com/Niko1221/Strata/pull/3374] to be merged, and I've applied it manually... It works well for this issue on : GPU RTX 2000 Ada Generation Laptop - CUDA 13.2 Thank you
Author
Owner

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

Thanks, and thanks to yudhanjaya for finding the cause (PR #3374). verify_q8 used a function that CUDA 12.0 and 12.1 only allow on the GPU. It copies the bits now, so it compiles on those versions. Fixed for 0.2.2, the next release (not out yet). Until then, updating CUDA to 12.2 or newer also works.

<!-- gh-comment-id:6308096787 --> @Niko1221 commented on GitHub (Oct 21, 2026): Thanks, and thanks to yudhanjaya for finding the cause (PR #3374). `verify_q8` used a function that CUDA 12.0 and 12.1 only allow on the GPU. It copies the bits now, so it compiles on those versions. Fixed for 0.2.2, the next release (not out yet). Until then, updating CUDA to 12.2 or newer also works.
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#1366
No description provided.