Skip to content

Clear the compile kill switch in the block CUDA graphs tests - #15167

Merged
danielhanchen merged 1 commit into
mainfrom
ci-block-cudagraphs-compile-env
Oct 24, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-block-cudagraphs-compile-env

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

tests/test_block_cudagraphs_clone.py::test_new_shapes_past_the_cap_skip_graphs, added by #15154, fails in the Repo tests (CPU, rest) shard (for example #15162):

tests/test_block_cudagraphs_clone.py:108: in test_new_shapes_past_the_cap_skip_graphs
    assert step(16) == {"graphs"}
E   AssertionError: assert set() == {'graphs'}

That shard runs with UNSLOTH_COMPILE_DISABLE=1. The wrapped block's forward checks _enabled() on every call and takes the eager path when the kill switch is set. So the fake torch.compile the test installs is never called, and it records no call. The product is right: the kill switch is supposed to win. The test assumed compile was on. It passes locally with the variable unset and fails with it set to 1.

Change

  • Same autouse fixture as tests/test_block_compile.py: clear UNSLOTH_BLOCK_COMPILE, UNSLOTH_COMPILE_DISABLE and UNSLOTH_FORCE_FLOAT32 for each test.
  • The layer/step setup moved into _cap_layer_step(), so a second test can use it.
  • test_compile_disable_still_bypasses_the_block: sets the kill switch after the block is wrapped and checks that the next call skips the compiled path. This pins down the behaviour the old test tripped over.

Verification

  • UNSLOTH_COMPILE_DISABLE=0 and =1: 6 passed both ways. On main the =1 case is 1 failed, 4 passed.
  • Sabotage 1: with the fixture not autouse, under UNSLOTH_COMPILE_DISABLE=1, test_new_shapes_past_the_cap_skip_graphs fails again with the CI error.
  • Sabotage 2: with the _enabled() check removed from the block's forward, test_compile_disable_still_bypasses_the_block fails.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T21:55:41.754563Z 41262e8 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 41262e8fe1

ℹ️ 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 007a846 into main Oct 24, 2026
0 of 14 checks passed
@danielhanchen
danielhanchen deleted the ci-block-cudagraphs-compile-env branch October 24, 2026 22:01
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