mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
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#433
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?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/421
Author: @XFDG
Created: 8/26/2026
Status: 🔄 Open
Base:
main← Head:fix-issue-414-capture-safe📝 Commits (5)
e33de5afix: make pack_ue8m0_to_int CUDA-graph capture safe (#414)7798589fix: add capture-safe value validation to pack_ue8m0_to_int32611f0fix: use bit-level checks for ue8m0 validation (avoid float rounding edge case)6f5df09fix: add docstring and fix inaccurate comment per ds-review-bot suggestions8e207fcfix: tighten UE8M0 capture guard and tests📊 Changes
2 files changed (+75 additions, -1 deletions)
View changed files
📝
deep_gemm/utils/math.py(+18 -1)➕
tests/test_pack_ue8m0.py(+57 -0)📄 Description
Problem
pack_ue8m0_to_intcalled.all()on device tensors:Inside a CUDA graph capture region,
.all()triggers a device→host sync which raisescudaErrorStreamCaptureUnsupported, breaking SGLang's decode graph via the MegaMoE FP8 staging path (issue #414).Fix
Use
torch.cuda.is_current_stream_capturing()to gate validation:Bit-level check avoids float rounding edge cases (e.g. subnormals like 2^-126 that
x.round()would incorrectly round to 0).Test (H200, CUDA 12.8)
ceil_to_ue8m0Addresses ds-review-bot v6 concern: validation is preserved outside capture paths.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.