mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3524] [Engine] SM70/Volta build fails: q36_engine.cu calls __device__ __half_as_ushort from host function verify_q8 #1444
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @li-y-w on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3524
Summary
Building the 0.1.45+ engine with
-DSTRATA_EXPERIMENTAL_SM60=ON(Volta / SM70, e.g. Tesla V100) fails:src/qwen35/q36_engine.cucalls the device-only intrinsic__half_as_ushort()from a host function.Environment
main@9de04cd4(Control 0.1.46.3, engine 0.1.46.3)CMAKE_CUDA_ARCHITECTURES=70)STRATA_EXPERIMENTAL_SM60=ONError
setup.sh --updateretries the build once, hits the same error, then falls back to the previously installed engine (could not compile the updated engine: starting the installed one), so the update silently no-ops while claiming success.Cause
verify_q8()is a host function (it only runs underSTRATA_Q36_VDEBUGfor debug output). Line 1659 casts the fp16 value of the CPU butterfly sum to its bit pattern:__half_as_ushortis declared__device__incuda_fp16.h; on this arch/header combination nvcc does not accept the host call. It is not guarded by#ifdef __CUDA_ARCH__, so the SM60/SM70 path cannot build at all.Fix
Read the bit pattern on the host directly — same value, no device intrinsic:
(or
__half2ushort_rn/ union pun; anything host-side). I verified this builds and runs:cmake --build build-cuda12 --target strata strata_qwen35→ OK./update.sh→engine compiled: .../engine-cuda12/strata,Strata is updated (engine 0.1.46.3)/health200, 262144 ctx, chat completions workSuggestion
Guard the debug cast with
#if defined(__CUDA_ARCH__)or use the host-safe conversion above, so the SM60 experimental path keeps compiling. Secondarily: when the engine build fails,update.shexiting 0 with "Strata is updated" is misleading — a non-zero exit code (or a clear "engine NOT updated" banner) would save users from thinking they upgraded when they did not.@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:
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
@github-actions[bot] commented on GitHub (Oct 21, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Oct 29, 2026):
Thank you. Fixed in 0.2.2:
verify_q8no longer calls the device-only__half_as_ushortfrom host code, so the Volta build gets past that line with CUDA 12.0 and 12.1. If the build stops at another line, send the new error.Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.2