Repository navigation
SDPA packed-segment test: gate the CUDA memory test on a real GPU - #12761
Merged
Merged
Conversation
#12740 added test_peak_memory_is_linear_in_tokens behind skipif(not torch.cuda.is_available()). tests/_zoo_aggressive_cuda_spoof.py patches that probe to True process-wide, so on a CPU runner sharing a session with the compat suites the test un-skips and allocates on cuda. test_accelerator_skip_guards catches exactly this and is red on main. Use has_real_cuda() like the sibling utils tests.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
Repo tests (CPU, studio)has a third failure on main, alongside the ones #12747 and #12751 address:Cause
#12740 (SDPA per-segment packed attention) added
test_peak_memory_is_linear_in_tokensgated onskipif(not torch.cuda.is_available()).tests/_zoo_aggressive_cuda_spoof.pypatches that probe toTruefor the whole process, so on a CPU runner that shares a session withtests/version_compatortests/vllm_compatthe test un-skips and calls.cuda(). The guard test exists to catch this, so it is right and the new test is what needs changing. The product change in #12740 is unaffected.Change
Gate on
has_real_cuda()fromtests/_shared/real_accelerator.py, which records the answer before any spoof runs. This is the same narrow probe the siblingtests/utils/test_attn_mask_compat.pyuses for a body that allocates oncuda.Verification
tests/python/test_accelerator_skip_guards.py: 1 failed, 23 passed on main (36255a18bd), 24 passed on this branch.