Repository navigation
Conversation
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
…port - dense_attention_reference gains optional seqlen_q / seqlen_kv. None keeps the exact unpadded arithmetic. When set, keys past seqlen_kv are masked, a row with no valid key yields O = 0, and padded query rows are zeroed. - _sdpa_seqlen.py: host adapter validating hipDNN's per-sequence lengths at the boundary (integer dtype, per-batch count, 0 <= len <= S_max) and returning the flat per-batch int32 arrays the shell reads. - _sdpa_padding_mask.py: host specification of the kernel-side mask -- keep_key (the shell's extra_mask_predicate hook) and row_is_valid (the epilogue's padded-row zeroing), with the emitter form documented. The live IR emitter is deferred to the shell, where it carries its byte-identity C++ mirror. This module is the host reference it must match, cross-checked against dense_attention_reference. Kernel wiring and GPU validation wait on the shell (ST4) and the arbitrary-length buffer clipping (ticket 8).
arai713
force-pushed
the
users/arai/padding_mask
branch
from
October 6, 2026 19:19
c5ea20c to
ecc2c39
Compare
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
Contributor
Author
|
Moved to this PR: #13953 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Padding-mask support on the SDPA path for gfx942/gfx950. The kernel-side masking has to land inside the stride shell, which doesn't exist yet, and the arbitrary-length buffer clipping it rides on is a separate ticket. This PR lands the host-side, non-blocked foundation so the kernel masking is a mechanical drop-in when the shell arrives: the oracle can express padding, the hipDNN length tensors are validated and normalized, and the exact mask the kernel must emit is specified and cross-checked.
Technical Details
Test Plan
Test Result
Related
JIRA ID: AICK-2518
Submission Checklist