Skip to content

Gate the fused decode RoPE tests on a real CUDA device, not the spoofable probe - #14661

Merged
danielhanchen merged 1 commit into
mainfrom
fix/decode-rope-real-cuda-guard
Oct 22, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/decode-rope-real-cuda-guard

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/python/test_accelerator_skip_guards.py::test_no_skip_guard_reads_a_spoofable_accelerator_probe fails on main since #14611:

E   AssertionError: these skip guards read a probe tests/_zoo_aggressive_cuda_spoof.py patches to True process-wide, ...
E       test_decode_fused_rope.py:230: torch.cuda.device_count()

It runs in the Backend CI studio shard (tests/python), so every PR whose shard runs on current main goes red there. The product code is fine; the test's skip condition is what the guard exists to catch.

Change

tests/test_decode_fused_rope.py:

  • The two-GPU test is gated not has_real_cuda() or torch.cuda.device_count() < 2, so the recorded real-hardware answer short-circuits ahead of the spoofable device_count(), which is the form the guard accepts.
  • The module-level skip read torch.cuda.is_available(), which the same spoof patches to True. The guard only inspects skipif decorators so it did not flag it, but in a session that loads the spoof it would un-skip the whole file on a CPU box. It now uses has_real_cuda() too.

Verification

  • The guard passes on this branch (24 passed) and fails on main with the line above (1 failed, 23 passed).
  • On a CPU box the file is skipped as one module.
  • On a real GPU, has_real_cuda() is True with device_count() 1, so the module still runs and only the two-GPU test skips.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T12:08:28.874332Z 2d8e602 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: 2d8e602216

ℹ️ 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 d4c1f46 into main Oct 22, 2026
@danielhanchen
danielhanchen deleted the fix/decode-rope-real-cuda-guard branch October 22, 2026 12:09
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