Repository navigation
[Fix] SM100: use the allocated tensor memory base - #122
Conversation
A CUDA graph kernel node keeps the same %gridid on every replay. The mega_mhc split barriers tag each execution with %gridid, so after a replay a barrier line still holds encode_state(grid_idx, kNumSplits), which is exactly the state the next replay waits for. A Mix or Norm waiter whose m-block init CTA has not started yet proceeds immediately and reads the previous replay's split partials. Tag executions with an epoch instead. The epoch and an exit count live in the unused tail of the first barrier line, so the host-side buffer is unchanged. Every CTA reads the epoch after cudaGridDependencySynchronize, and the last CTA to retire resets the exit count and advances the epoch. Signed-off-by: lightseek-bot <[email protected]>
|
Validated on one NVIDIA B300 (CUDA 13.2, PyTorch 2.13):
The original concurrency-only test passed both versions. The revised test reserves 256 columns in a temporary header copy to require a nonzero base; diagnostic runs confirmed base 256. Potentially we can drop the test if the temporary-header fixture is too intrusive. |
|
@Fridge003 Could you review this? Thanks! |
|
Hi @henrylhtsang, can you please run the blackwell tests under |
|
Tested b4911aa on one NVIDIA B300 SXM6 AC (SM103): CUDA 13.2 (nvcc 13.2.78), driver 595.91.07, PyTorch 2.13.0+cu132, GCC 13.3, Compute Sanitizer 2026.1.1.
Additional single-GPU tests omitted by the main runner both passed with default arguments: Also ran edit 1: checked the edit 2: With DeepEP 2.1.0, both |
|
@Fridge003 any chance to get an approval and merge? |
…ts epilogue Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Motivation
Fixes deepseek-ai/DeepGEMM#479.
SM100 kernels assume tensor memory (TMEM) starts at column zero, although allocation returns a base address. Use that base for accesses and deallocation, following CUTLASS's allocation and accumulator setup and deallocation.
Modifications
Accuracy Tests
On one NVIDIA B300 (SM103), CUDA 13.2, PyTorch 2.13:
memcheckreportstcgen05.deallocon unallocated TMEM (exit 99).memcheckandsynccheck: both pass with zero errors, including a subsequent run after restoring the original JIT configuration.git diff --check, Python syntax validation, and static allocation/base/deallocation audit pass.This reproduces the zero-base defect under a controlled allocation; it does not establish the original crash's scheduling interleaving.
Speed Tests and Profiling
Not run; no performance result is claimed.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci