Conversation
mega_mhc.cuh uses __nv_fp8_e4m3 in NormArgs, which is compiled by host g++ via csrc/python_api.cpp. CUTLASS gates cuda_fp8.h behind CUDA_FP8_ENABLED which requires __CUDACC_VER_* (nvcc-only), so the type is invisible to g++. Add an explicit include to fix the build error. Fixes deepseek-ai#438 Signed-off-by: zhaoye <yzhao04@iquestlab.com> Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
🤖 ds-review-bot Code Reviewv6直接包含 cuda_fp8.h 为主机编译提供了所需的 FP8 类型定义,符合项目 CUDA 版本要求,未发现该变更引入回归。当前环境缺少 CUDA 工具链,未实际验证构建。 v5该 MR 在 v4This MR adds an explicit Review outcome: approved. No defects, regressions, or required changes were identified. Files reviewed: 1 |
|
Resolved the remaining bot thread after rechecking it: the comment explicitly marks the repository-wide header scan as optional and out of scope for this focused fix. The PR remains the minimal one-header correction, and the bot review found no regression. No code change was needed. |
Summary
mega_mhc.cuhuses__nv_fp8_e4m3inNormArgs, which is compiled by host g++ viacsrc/python_api.cpp. CUTLASS gatescuda_fp8.hbehindCUDA_FP8_ENABLEDwhich requires__CUDACC_VER_*— defined only by nvcc, not g++ — so the type is invisible during host compilation.Fix
Add
#include <cuda_fp8.h>directly inmega_mhc.cuhbefore any other includes, so the type is visible to both nvcc and g++.Testing
bash ./develop.shon B200 (SM100, CUDA 13.1, gcc-13)python3 -c "import deep_gemm; print(deep_gemm.__version__)"passesFixes #438