mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[GH-ISSUE #330] [SM100/B300][BF16] bf16_gemm_nt failure with prebuilt wheel, fixed by rebuilding against current PyTorch #163
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepGEMM#163
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 @benjibc on GitHub (May 9, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/330
Hi DeepGEMM team,
We hit a failure on B300/SM100 in the BF16 dense GEMM path that initially looked like an SM100
bf16_gemm_ntissue. After narrowing it down, the current evidence points more specifically at binary wheel / PyTorch build compatibility: the failure happens with a prebuilt DeepGEMM wheel in one PyTorch 2.11 environment, but rebuilding DeepGEMM from the same public commit against that exact PyTorch install fixes it.I am filing this mainly to ask whether this is expected, and whether the install/docs should explicitly call out that the
deep_gemm._Cextension must be rebuilt whenever the PyTorch build changes.Failing environment
Observed on:
The container image for the failing environment is internal, so I cannot share it directly. It has a preinstalled
deep_gemmwheel.Failure
A direct call to:
can fail with:
With
TORCH_SHOW_CPP_STACKTRACES=1, the C++ stack pointed into the BF16 dense path and the output TMA descriptor construction:The tensors are ordinary contiguous CUDA tensors, and Python can read their
data_ptr()values immediately before the DeepGEMM call.Representative failing layout:
Repro script pattern
What passes
The same script passes when DeepGEMM is rebuilt from source at the same commit against the current PyTorch install:
After rebuilding from source in the same PyTorch 2.11 / CUDA 13.0 / B300 environment, the script above passed 100/100 iterations.
We also tested public NGC images with source-built DeepGEMM at the same commit:
Question
Is it expected that a DeepGEMM wheel built against one PyTorch build can fail this way when loaded under a different PyTorch build, even when the DeepGEMM commit and CUDA major version are otherwise compatible?
If yes, it may be useful to document this more explicitly around installation/redeployment of DeepGEMM wheels, especially for SM100/BF16 users. The observed failure mode is confusing because it surfaces as a host-side
Tensorstorage/data pointer error while constructing the TMA descriptor, rather than as a clean extension ABI/version error.Thanks.
@benjibc commented on GitHub (May 9, 2026):
Follow-up: after further testing, this appears to be a downstream packaging issue on our side rather than a DeepGEMM SM100/BF16 correctness bug. Rebuilding DeepGEMM from source at the same commit against the exact PyTorch build in the affected image makes the fresh-allocation BF16 repro pass. Public NGC 25.10 and 26.03 images with source-built DeepGEMM also pass. Closing this to avoid noise; the actionable fix is for our image build to rebuild/reinstall deep_gemm after rebuilding PyTorch.