[MPS] expand the current export unit test for SDPA#177686
Draft
mergennachin wants to merge 1 commit intomainfrom
Draft
[MPS] expand the current export unit test for SDPA#177686mergennachin wants to merge 1 commit intomainfrom
mergennachin wants to merge 1 commit intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/177686
Note: Links to docs will display an error until the docs builds have been completed. ❌ 9 New Failures, 1 Unrelated FailureAs of commit e9892cb with merge base 14b40e9 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
malfet
reviewed
Mar 17, 2026
Contributor
malfet
left a comment
There was a problem hiding this comment.
Let's move this whole test to test_aot_inductor.py so that we test it for all devices.
Also, would please consider deleting unused functions from meta registration
Address review feedback: move the SDPA dynamic seq len export test from test_mps.py to test_aot_inductor.py so it runs on all devices (cpu, gpu, mps). Use F.scaled_dot_product_attention instead of the MPS-specific op. Also clean up the meta registration for _scaled_dot_product_attention_math_for_mps: inline the single-use sdpa_general_mps() helper and remove the dead ensure_4d(key) call, both left over from the branching logic removed in #177620. Authored with Claude.
8b29ae7 to
e9892cb
Compare
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.
Summary
Move the SDPA dynamic seq len export test from
test_mps.pytotest_aot_inductor.pyso it runs on all devices (cpu, gpu, mps), usingF.scaled_dot_product_attentioninstead of the MPS-specific op.Also clean up the meta registration for
_scaled_dot_product_attention_math_for_mps: inline the single-usesdpa_general_mps()helper and remove the deadensure_4d(key)call, both left over from the branching logic removed in #177620.Regression test for #177603.
Test plan
python test/inductor/test_aot_inductor.py -k test_sdpa_dynamic_seq_lencc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @hvaara