[PR #3374] [Engine] verify_q8: fix the CUDA 12.0/12.1 build (host call to device-only __half_as_ushort) #4598

Open
opened 2026-11-07 15:37:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3374
Author: @yudhanjaya
Created: 10/20/2026
Status: 🔄 Open

Base: main ← Head: fix-verify-q8-half-as-ushort


📝 Commits (1)

  • 21d1b58 qwen35: verify_q8 no longer calls the device-only __half_as_ushort from host code (CUDA 12.0/12.1 build, #3368)

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 src/qwen35/q36_engine.cu (+4 -1)

📄 Description

Fixes #3368 (also reported in the closed #2926).

What it changes: verify_q8 (the STRATA_Q36_VERIFY=1 debug path in src/qwen35/q36_engine.cu) printed the half bits with __half_as_ushort(...). That function is __device__ only in CUDA 12.0/12.1, so nvcc rejects the call from host code and the whole engine fails to build. The bits are now copied out of the __half with memcpy. Same value, same output.

What it leaves alone: only the debug print in that one function. No kernel, no default path, no other backend file is touched; the default path is byte-identical (the changed lines run only with STRATA_Q36_VERIFY=1 and a mismatch).

How I checked: nvcc 12.0.140, Ubuntu, arch=compute_86 and compute_89 (RTX 3060 + RTX 4080 SUPER): ./update.sh rebuilt the engine without error and reports engine 0.1.45.3.

Not tested: HIP and SYCL builds; running with STRATA_Q36_VERIFY=1; CUDA 12.1+ (the error is the same one in #2926).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3374 **Author:** [@yudhanjaya](https://github.com/yudhanjaya) **Created:** 10/20/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-verify-q8-half-as-ushort` --- ### 📝 Commits (1) - [`21d1b58`](https://github.com/Niko1221/Strata/commit/21d1b58e3a668b8b547a8d145c8e0d5778e49ecf) qwen35: verify_q8 no longer calls the device-only __half_as_ushort from host code (CUDA 12.0/12.1 build, #3368) ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/qwen35/q36_engine.cu` (+4 -1) </details> ### 📄 Description Fixes #3368 (also reported in the closed #2926). **What it changes:** `verify_q8` (the `STRATA_Q36_VERIFY=1` debug path in `src/qwen35/q36_engine.cu`) printed the half bits with `__half_as_ushort(...)`. That function is `__device__` only in CUDA 12.0/12.1, so nvcc rejects the call from host code and the whole engine fails to build. The bits are now copied out of the `__half` with `memcpy`. Same value, same output. **What it leaves alone:** only the debug print in that one function. No kernel, no default path, no other backend file is touched; the default path is byte-identical (the changed lines run only with `STRATA_Q36_VERIFY=1` and a mismatch). **How I checked:** nvcc 12.0.140, Ubuntu, `arch=compute_86` and `compute_89` (RTX 3060 + RTX 4080 SUPER): `./update.sh` rebuilt the engine without error and reports engine 0.1.45.3. **Not tested:** HIP and SYCL builds; running with `STRATA_Q36_VERIFY=1`; CUDA 12.1+ (the error is the same one in #2926). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#4598
No description provided.