Skip to content

Tests: gate the ROCm SDPA self-check GPU tests on real CUDA - #18503

Merged
danielhanchen merged 1 commit into
mainfrom
ci/rocm-sdpa-check-real-cuda-skip
Nov 19, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/rocm-sdpa-check-real-cuda-skip

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, studio) fails on main (seen on #18496, whose base already has #18490):

FAILED tests/python/test_accelerator_skip_guards.py::test_no_skip_guard_reads_a_spoofable_accelerator_probe
E       utils/test_rocm_sdpa_check.py:348: torch.cuda.is_available()
E       utils/test_rocm_sdpa_check.py:356: torch.cuda.is_available()

Root cause

#18453 added tests/utils/test_rocm_sdpa_check.py with two GPU tests gated on torch.cuda.is_available(). tests/_zoo_aggressive_cuda_spoof.py patches that probe to True process-wide, so on a CPU runner these tests un-skip and launch the SDPA self-check children whenever they share a pytest session with the spoofing suites. The guard caught it; the ROCm change itself is unaffected.

Changes

  • Both skips now gate on has_real_cuda() first (not has_real_cuda() or not torch.cuda.is_available()). has_real_cuda() records torch.cuda.is_available() before any spoof, so it stays true on a real ROCm or CUDA host, where these tests still run.

Testing

  • pytest tests/utils/test_rocm_sdpa_check.py tests/python/test_accelerator_skip_guards.py: 48 passed, 2 skipped (the two GPU tests, on this CPU host). The guard fails on main with the error above.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T16:43:40.704540Z 1409336 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 1409336e64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danielhanchen
danielhanchen merged commit 5c3cfaa into main Nov 19, 2026
@danielhanchen
danielhanchen deleted the ci/rocm-sdpa-check-real-cuda-skip branch November 19, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant