Repository navigation
Use the accelerator device in TestZero3SynchronizedEarlyStop - #9058
Merged
delock merged 2 commits intoNov 12, 2026
Merged
Conversation
The test hardcoded torch.device(f"cuda:{rank}"), so the cpu multi-rank
nightly fails with "Torch not compiled with CUDA enabled" as soon as the
prompt tensors are built. Take the device from get_accelerator() like the
rest of the suite.
Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
Contributor
Author
Codex Review Summary: ✅ CompletedThis 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. |
Collaborator
|
Hi @dundysm thanks for catching this! |
delock
approved these changes
Nov 12, 2026
delock
enabled auto-merge
November 12, 2026 07:56
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.
what
TestZero3SynchronizedEarlyStop(added in #8390) builds its tensors ontorch.device(f"cuda:{rank}"). on the cpu multi-rank nightly (cpu-torch-multi-latest,LOCAL_SIZE=4) the test is admitted by the world-size gate, and the firsttorch.tensor(..., device=device)raisesAssertionError: Torch not compiled with CUDA enabled. that is the 2026-11-11 recurrence in #9033 (run 42957495892).this takes the device from
get_accelerator().current_device_name(), which iscpuon the cpu accelerator andcuda:<local rank>on cuda, so the gpu path is unchanged.why this is not a duplicate
no open pr touches this test; #9009 and #9037 edit the same file but not this class.
tests
on cpu (8 vcpu x86_64, torch 2.15.0+cpu, python 3.12), with
LOCAL_SIZE=4:pytest unit/runtime/rollout/test_hybrid_engine_rollout.py::TestZero3SynchronizedEarlyStopfails withTorch not compiled with CUDA enabled, same traceback as the nightly1 passedpytest unit/runtime/rollout/: 94 passed, 2 skipped;TestZero3SubgroupGenerationfailed locally only becauseaccelerateis not installed in my envnot run on gpu; the cuda device string is the same as before apart from using the local rank instead of the global rank.
fixes #9033 (the hybrid engine rollout part; the earlier
test_tp_compile.pyfailure looked flaky per the thread)