Repository navigation
Conversation
…e tests Summary: Forward fix for D125399978 (#200311). fbcode sets `guess_tangent_strides_as_outputs = not is_fbcode()`, so in fbcode the backward copies the gradient with `aten::clone` instead of `empty_strided` + `copy_`, and the inline expected `DebugMode` traces in `test_set_output_grad_dtype` and `test_set_output_grad_dtype_non_tensor_output` don't match. Pin `torch._functorch.config.patch(guess_tangent_strides_as_outputs=True)` on both tests, matching existing tests in `test_backward_higher_order_ops.py`, `test_modes.py` and `test_debug_mode.py`. Test Plan: ``` buck test fbcode//caffe2/test/dynamo:test_dynamo -- --regex 'test_autograd_function.*test_set_output_grad_dtype' ``` Differential Revision: D125489641
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/201096
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b641d66 with merge base c76cbca ( 🟢 GREEN LIGHT - PR approved to be merged without human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pianpwk has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125489641. |
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
majing921201
pushed a commit
to majing921201/pytorch
that referenced
this pull request
Nov 16, 2026
…e tests (pytorch#201096) Summary: Forward fix for D125399978 (pytorch#200311). fbcode sets `guess_tangent_strides_as_outputs = not is_fbcode()`, so in fbcode the backward copies the gradient with `aten::clone` instead of `empty_strided` + `copy_`, and the inline expected `DebugMode` traces in `test_set_output_grad_dtype` and `test_set_output_grad_dtype_non_tensor_output` don't match. Pin `torch._functorch.config.patch(guess_tangent_strides_as_outputs=True)` on both tests, matching existing tests in `test_backward_higher_order_ops.py`, `test_modes.py` and `test_debug_mode.py`. Test Plan: ``` buck test fbcode//caffe2/test/dynamo:test_dynamo -- --regex 'test_autograd_function.*test_set_output_grad_dtype' ``` Differential Revision: D125489641 Pull Request resolved: pytorch#201096 Approved by: https://github.com/pytorchgreenlight
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.
Summary:
Forward fix for D125399978 (#200311). fbcode sets
guess_tangent_strides_as_outputs = not is_fbcode(), so in fbcode the backward copies the gradient withaten::cloneinstead ofempty_strided+copy_, and the inline expectedDebugModetraces intest_set_output_grad_dtypeandtest_set_output_grad_dtype_non_tensor_outputdon't match.Pin
torch._functorch.config.patch(guess_tangent_strides_as_outputs=True)on both tests, matching existing tests intest_backward_higher_order_ops.py,test_modes.pyandtest_debug_mode.py.Test Plan:
Differential Revision: D125489641
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @azahed98