[GH-ISSUE #3548] maya-ds4 fails to compile on Tesla V100 (Volta) due to undefined __bfloat16_as_ushort #1457

Closed
opened 2026-11-04 01:51:25 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @judasatan on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3548

Environment
GPU: 2x NVIDIA Tesla V100-SXM2-32GB (Compute Capability 7.0, Volta)

CUDA Version: 12.0

OS: Ubuntu 24.04

Driver: 580.178.04

g++ Version: 13.3.0

Model selected: DeepSeek-V4.1-Flash-1017

Quant format selected: Maya-S (340 GB)

Issue Summary
While attempting to build the engine for DeepSeek-V4.1-Flash-1017 (maya-ds4), the compilation fails completely on a Volta architecture GPU (V100).

The docs/MODELS.md explicitly states that the Maya-S quant for DeepSeek "Runs on NVIDIA from Volta (V100) on". However, the source code for the maya-ds4 engine appears to use CUDA built-in functions that are not available on compute capability 7.0.

Error Log
The build fails during the compilation of maya-ds4 target with the following error:

text
[83/112] Building CUDA object CMakeFiles/maya-ds4.dir/src/ds4/ds4_kernels.cu.o
FAILED: [code=1] CMakeFiles/maya-ds4.dir/src/ds4/ds4_kernels.cu.o
/usr/bin/nvcc -forward-unknown-to-host-compiler -DSTRATA_NATIVE_EXPERTS=1 -DSTRATA_VERSION="0.1.27" ... -arch=native ...
/data/project-maya/src/ds4/ds4_numerics.cuh(19): error: identifier "__bfloat16_as_ushort" is undefined

1 error detected in the compilation of "/data/project-maya/src/ds4/ds4_kernels.cu".
(Note: The same error also occurs for ds4_vision.cu and ds4_gguf.cu)

Analysis
The root cause is that hardware-level BF16 (bfloat16) support was introduced in the Ampere architecture (compute capability 8.0). The intrinsic function __bfloat16_as_ushort is used in ds4_numerics.cuh but is not recognized by nvcc when targeting Volta (compute capability 7.0).

It seems the code lacks the proper #if CUDA_ARCH >= 800 preprocessor guards to provide a software fallback (or disable the path) for older architectures like V100.

Steps to Reproduce
Use a machine with an NVIDIA Tesla V100 (or any Volta/Pascal GPU).

Run ./setup.sh --setup

Select 2) DeepSeek-V4.1-Flash-1017 and any quant format.

The setup proceeds to compile the maya-ds4 engine and fails at step 4.

Expected Behavior
The engine should compile successfully on V100 as stated in the documentation, falling back to software emulation for BF16 operations if hardware support is absent.

Possible Fix
Wrap the BF16 intrinsics in ds4_numerics.cuh with #if defined(CUDA_ARCH) && (CUDA_ARCH >= 800) and provide an alternative bitwise manipulation or standard __nv_bfloat16 software fallback for older architectures.

Originally created by @judasatan on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3548 Environment GPU: 2x NVIDIA Tesla V100-SXM2-32GB (Compute Capability 7.0, Volta) CUDA Version: 12.0 OS: Ubuntu 24.04 Driver: 580.178.04 g++ Version: 13.3.0 Model selected: DeepSeek-V4.1-Flash-1017 Quant format selected: Maya-S (340 GB) Issue Summary While attempting to build the engine for DeepSeek-V4.1-Flash-1017 (maya-ds4), the compilation fails completely on a Volta architecture GPU (V100). The docs/MODELS.md explicitly states that the Maya-S quant for DeepSeek "Runs on NVIDIA from Volta (V100) on". However, the source code for the maya-ds4 engine appears to use CUDA built-in functions that are not available on compute capability 7.0. Error Log The build fails during the compilation of maya-ds4 target with the following error: text [83/112] Building CUDA object CMakeFiles/maya-ds4.dir/src/ds4/ds4_kernels.cu.o FAILED: [code=1] CMakeFiles/maya-ds4.dir/src/ds4/ds4_kernels.cu.o /usr/bin/nvcc -forward-unknown-to-host-compiler -DSTRATA_NATIVE_EXPERTS=1 -DSTRATA_VERSION=\"0.1.27\" ... -arch=native ... /data/project-maya/src/ds4/ds4_numerics.cuh(19): error: identifier "__bfloat16_as_ushort" is undefined 1 error detected in the compilation of "/data/project-maya/src/ds4/ds4_kernels.cu". (Note: The same error also occurs for ds4_vision.cu and ds4_gguf.cu) Analysis The root cause is that hardware-level BF16 (bfloat16) support was introduced in the Ampere architecture (compute capability 8.0). The intrinsic function __bfloat16_as_ushort is used in ds4_numerics.cuh but is not recognized by nvcc when targeting Volta (compute capability 7.0). It seems the code lacks the proper #if __CUDA_ARCH__ >= 800 preprocessor guards to provide a software fallback (or disable the path) for older architectures like V100. Steps to Reproduce Use a machine with an NVIDIA Tesla V100 (or any Volta/Pascal GPU). Run ./setup.sh --setup Select 2) DeepSeek-V4.1-Flash-1017 and any quant format. The setup proceeds to compile the maya-ds4 engine and fails at step 4. Expected Behavior The engine should compile successfully on V100 as stated in the documentation, falling back to software emulation for BF16 operations if hardware support is absent. Possible Fix Wrap the BF16 intrinsics in ds4_numerics.cuh with #if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 800) and provide an alternative bitwise manipulation or standard __nv_bfloat16 software fallback for older architectures.
bsakaguchi 2026-11-04 01:51:25 +07:00
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".

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:6309733458 --> @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". 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)
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#1457
No description provided.