Issues / #3548

#3548 maya-ds4 fails to compile on Tesla V100 (Volta) due to undefined __bfloat16_as_ushort

closed · @judasatan · 1 comentários · No GitHub

needs-format

Descrição

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.

No site

Links install, modelos, releases.