-
Notifications
You must be signed in to change notification settings - Fork 264
frost(sdpa): SM120 THD zero-host-read execute — device-built metadata, declared-S_q envelope grid, CUDA-graph capturable (issue #552) #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vedaanta
merged 2 commits into
NVIDIA:develop
from
vedaanta:vagarwalla/frost-thd-552-sm120
Aug 17, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Resolve the launch stream before any Torch work. Both execution paths create or transform tensors before they resolve
current_stream. An explicit caller stream can then launch the kernel before initialization on Torch's current stream completes.python/cudnn/sdpa/fwd/api_dsl.py#L2248-L2251: resolve the stream before dense fallback length tensors are created.python/cudnn/sdpa/fwd/api_dsl.py#L2370-L2372: resolve the stream before FP8 fallback allocation and Q/K/V conversion.📍 Affects 1 file
python/cudnn/sdpa/fwd/api_dsl.py#L2248-L2251(this comment)python/cudnn/sdpa/fwd/api_dsl.py#L2370-L2372🤖 Prompt for AI Agents
Source: Coding guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split out deliberately to keep this PR scoped to the THD port: the Rule 5 fix (resolve the launch stream first, run the tensor prep —
_to_bshdgather copies, the dummies' first-use zero-fill — and the copy-backs inside_torch_stream_context) ships as a follow-up PR covering both SM120 execute paths and the three SM100 sites with the identical pattern (dense f16, mxfp8, fp8), branchvagarwalla/frost-rule5-stream-order. The THD path this PR adds already resolves the stream before_thd_pack.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vedaanta, thanks for the scope clarification.The THD path resolves the launch stream before
_thd_pack. The dense SM120 and SM100 paths still need the Rule 5 stream-order update. I will keep this finding open because this PR does not include that update.Would you like me to create a GitHub follow-up issue that links this PR and the review comment?
🐇
✏️ Learnings added
You are interacting with an AI system.