Skip to content

Tests: gate the Inductor Triton eager-vals GPU test on real CUDA - #18490

Merged
danielhanchen merged 1 commit into
mainfrom
ci/triton-eager-vals-real-cuda-skip
Nov 19, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/triton-eager-vals-real-cuda-skip

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, studio) fails on main (seen on #18486, which only touches the Studio tool loop):

FAILED tests/python/test_accelerator_skip_guards.py::test_no_skip_guard_reads_a_spoofable_accelerator_probe
E   AssertionError: these skip guards read a probe tests/_zoo_aggressive_cuda_spoof.py patches to True process-wide, ...
E       test_inductor_triton_wrapper_eager_vals.py:82: torch.cuda.is_available()

Reproduced locally on main at 3bf013b163.

Root cause

#18472 added tests/test_inductor_triton_wrapper_eager_vals.py, whose GPU test is gated on torch.cuda.is_available(). tests/_zoo_aggressive_cuda_spoof.py patches that probe to True process-wide, so on a CPU runner the test un-skips and tries to compile a Triton kernel whenever it shares a pytest session with the spoofing suites. The existing guard caught it; the fix in #18472 itself is unaffected.

Changes

  • The skip now gates on has_real_cuda() first (not has_real_cuda() or not torch.cuda.is_available()), the form the guard recognises and the other CUDA-only tests use.

Testing

  • pytest tests/test_inductor_triton_wrapper_eager_vals.py tests/python/test_accelerator_skip_guards.py: 25 passed, 1 skipped (the GPU test, 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-19T15:32:14.674796Z 51707b3 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. 🎉

Reviewed commit: 51707b32d2

ℹ️ 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 98f23d8 into main Nov 19, 2026
@danielhanchen
danielhanchen deleted the ci/triton-eager-vals-real-cuda-skip branch November 19, 2026 15:32
danielhanchen added a commit that referenced this pull request Nov 19, 2026
## 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.
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