Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/200981
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unclassified FailureAs of commit 216b6f0 with merge base f8c63a1 ( NEW FAILURE - The following job has failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
This branch has not been deployed
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.
Stack from ghstack (oldest at bottom):
DebugMode crashed on construction in builds with USE_DISTRIBUTED=0 (e.g.
macOS CI): init unconditionally imported torch.distributed.tensor, which
imports torch._C._distributed_c10d. torch_dispatch and the stringify/hash
helpers had the same unconditional DTensor, LocalTensor and
AsyncCollectiveTensor references.
All of these exist only to handle distributed tensor types, which cannot exist
when distributed is unavailable, so gate them on
torch.distributed.is_available(). record_nn_module still requires distributed
(ModTracker lives in torch.distributed._tools); it is opt-in and left as is.
This lets the set_output_grad_dtype DebugMode tests from the previous commit
run without distributed, so their skips are removed.
Test plan:
106 and 39 passed. To exercise the no-distributed path on a Linux build, I ran
test_autograd_function.py with a local sitecustomize that strips
torch._C's distributed init hooks (_c10d_init, _rpc_init, ...) so
torch.distributed.is_available() is False. That reproduces the macOS CI error
(ModuleNotFoundError: No module named 'torch._C._distributed_c10d' from
DebugMode.init) before this change; afterwards all non-GPU tests pass.
This PR was authored with an AI assistant (Claude Code).