[PR #439] [CLOSED] [Bugfix][Layout] Add cuda_fp8.h include to fix __nv_fp8_e4m3 undefined #447

Closed
opened 2026-10-26 21:17:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/439
Author: @XFDG
Created: 9/11/2026
Status: ❌ Closed

Base: main ← Head: fix/438-mega-mhc-fp8-include


📝 Commits (1)

  • ea2b780 [Bugfix][Layout] Add cuda_fp8.h include to fix __nv_fp8_e4m3 undefined

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 deep_gemm/include/deep_gemm/layout/mega_mhc.cuh (+2 -0)

📄 Description

Summary

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_* — defined only by nvcc, not g++ — so the type is invisible during host compilation.

Fix

Add #include <cuda_fp8.h> directly in mega_mhc.cuh before any other includes, so the type is visible to both nvcc and g++.

Testing

  • Built successfully with bash ./develop.sh on B200 (SM100, CUDA 13.1, gcc-13)
  • python3 -c "import deep_gemm; print(deep_gemm.__version__)" passes

Fixes #438


🔄 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/deepseek-ai/DeepGEMM/pull/439 **Author:** [@XFDG](https://github.com/XFDG) **Created:** 9/11/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/438-mega-mhc-fp8-include` --- ### 📝 Commits (1) - [`ea2b780`](https://github.com/deepseek-ai/DeepGEMM/commit/ea2b7805b97956268bed1adf94591f428ded6cc1) [Bugfix][Layout] Add cuda_fp8.h include to fix __nv_fp8_e4m3 undefined ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `deep_gemm/include/deep_gemm/layout/mega_mhc.cuh` (+2 -0) </details> ### 📄 Description ## Summary `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_*` — defined only by nvcc, not g++ — so the type is invisible during host compilation. ## Fix Add `#include <cuda_fp8.h>` directly in `mega_mhc.cuh` before any other includes, so the type is visible to both nvcc and g++. ## Testing - Built successfully with `bash ./develop.sh` on B200 (SM100, CUDA 13.1, gcc-13) - `python3 -c "import deep_gemm; print(deep_gemm.__version__)"` passes Fixes #438 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:17:58 +00:00
Sign in to join this conversation.
No labels
pull-request
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
deepseek-ai/DeepGEMM#447
No description provided.