Repository navigation
Conversation
Allocate the mutable pointer arrays and cuBLAS scratch on the invoking stream. Clear scratch on older cuBLASLt before dispatch to avoid carrying stale descriptors across layouts. Cover independent graph generations and repeated FP8 block-scaling replay. Signed-off-by: Matvey Saprykin <mtvey.s@gmail.com>
Signed-off-by: Matvey Saprykin <mtvey.s@gmail.com>
Signed-off-by: Matvey Saprykin <mtvey.s@gmail.com>
|
@rohitna thanks again for reporting this. The GroupedTensor fix for #3963 is in this draft at FYI @ksivaman @timmoon10 @denera, this is the GroupedTensor follow-up to #3625 and the legacy replay case discussed in #3171. Pre-commit and DCO passed. The H200 run used the existing TE native build, and the full CI and scratch-clear timing are still pending. I'll keep it in draft while I review the patch. |
|
@ksivaman @timmoon10 @zhongbozhu #4004 is now ready for review at |
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryGives each GroupedTensor GEMM its own setup and cuBLASLt scratch buffers.
No actionable issues found. Review was source-based; GPU tests were not run. Reviews (1) · Last reviewed commit: "Remove obsolete gradient-reset call from..." · Reviewed by Greptile |
Two overlapping PyTorch GroupedTensor GEMMs can write the same setup arrays and use the same cuBLASLt scratch. The caches are keyed by device and group count or layout, so they also alias across independent CUDA graph captures. Fixes #3963.
Allocate both mutable buffers for each invocation on the caller's CUDA stream. PyTorch orders eager reuse on that stream and keeps captured storage in the graph pool. For cuBLASLt versions before 13.8, clear the 32 MiB scratch before every launch to guard against the stale descriptors seen on mixed-layout replay in #3171.
Pre-commit passed. On H200 with cuBLASLt 13.5.1, the allocation changes passed all four workspace cases and two FP8 block-scaling replays against an existing TE native build. This used the exact allocation code and test definitions from this branch in that runtime. Full upstream CI and performance measurements are pending. The legacy scratch clear adds a device operation per call.