frost(sdpa): drop the redundant zero-fill of the never-read THD sinks dummy (SM100) - #573
Conversation
… dummy (SM100) A per-execute fill kernel on the THD execute hot path zeroed the dummy sinks buffer, whose contents provably do not matter: the sinks slot is always part of the kernel ABI, but CFG.HAS_SINK is a compile-time fold — when the graph declares no sink the kernel never reads the buffer (and execute() enforces has_sink <=> sinks is not None, so the dummy only exists in the never-read case). The fill dates to the original FROST landing (NVIDIA#476) as belt-and-braces. Rule 1: no adapter-side fills on the execute hot path. Split out of NVIDIA#543 (its O-descriptor twin stays there); textual overlap with NVIDIA#543's stream-binding of the same else-branch — whichever lands second has a trivial rebase. Verified on SM100 (B200-class): 180 passed across the THD fp16/graph suites, including the sink-less THD cases that bind the unfilled dummy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSM100 THD execution now obtains an uninitialized ABI-only dummy buffer when no sinks are provided. The buffer comes from workspace or ChangesSM100 THD dummy buffer
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This change removes an unnecessary zero-fill from the SM100 THD execute path while retaining the required dummy buffer binding; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@cudnn-ci-bot run frost |
|
🚀 Running mirror pipeline Branch: cudnn-gh/pr-573-f050b57 |
Problem
A per-execute fill kernel on the SM100 THD execute hot path zeroes the dummy sinks buffer — scratch whose contents provably do not matter: the sinks slot is always part of the kernel ABI, but
CFG.HAS_SINKis a compile-time fold, so when the graph declares no sink the kernel never reads the buffer (andexecute()enforceshas_sink <=> sinks is not None, so the dummy only exists in the never-read case).The fill dates to the original FROST landing (#476) as belt-and-braces; AGENTS.md Rule 1 bans adapter-side fills on the execute hot path.
Fix
Bind the carved/allocated dummy without the
zero_()/torch.zerosfill (one hunk in_execute_thd). Split out of #543 so it can land independently; #543 keeps the matching O-descriptor no-fill and touches the sameelse-branch for stream-binding — whichever lands second has a trivial one-hunk rebase.Verification
🤖 Generated with Claude Code
Summary by CodeRabbit