-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Deprecate torch.cross default behaviour #108760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Long overdue this one. We may be able to change it in a few years :hopeful:. **BC-breaking note** This PR deprecates `torch.cross`'s default dim in favor of `torch.linalg.cross`. A upgrade guide is added to the documentation for `torch.cross`. Note this PR DOES NOT remove `torch.cross`. Fixes #108664 [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/108760
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ad88b70 with merge base 06b1737 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Long overdue this one. We may be able to change it in a few years :hopeful:. **BC-breaking note** This PR deprecates `torch.cross`'s default dim in favor of `torch.linalg.cross`. A upgrade guide is added to the documentation for `torch.cross`. Note this PR DOES NOT remove `torch.cross`. Fixes #108664 ghstack-source-id: fb21a77 Pull Request resolved: #108760
|
That Softmax deprecation may be more painful, and it'll need to be done by someone at meta. Feel free to poke them in that other issue. |
|
Yeah, for softmax default dim was deprecated for a few years no, but still not removed :) which makes it have a functional wrapper and nasty stacklevel arg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit on the doc but sounds good otherwise
aten/src/ATen/native/Cross.cpp
Outdated
| if (!dimension) { | ||
| TORCH_WARN_ONCE( | ||
| "Using torch.cross without specifying the dim arg is deprecated.\n", | ||
| "Please either pass the dim explicitly or simply use linalg.cross.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
| "Please either pass the dim explicitly or simply use linalg.cross.\n", | |
| "Please either pass the dim explicitly or simply use torch.linalg.cross.\n", |
Long overdue this one. We may be able to change it in a few years :hopeful:. **BC-breaking note** This PR deprecates `torch.cross`'s default dim in favor of `torch.linalg.cross`. A upgrade guide is added to the documentation for `torch.cross`. Note this PR DOES NOT remove `torch.cross`. Fixes #108664 cc jianyuh nikitaved pearu mruberry walterddr IvanYashchuk xwang233 Lezcano [ghstack-poisoned]
Long overdue this one. We may be able to change it in a few years :hopeful:. **BC-breaking note** This PR deprecates `torch.cross`'s default dim in favor of `torch.linalg.cross`. A upgrade guide is added to the documentation for `torch.cross`. Note this PR DOES NOT remove `torch.cross`. Fixes #108664 ghstack-source-id: 3e7bae9 Pull Request resolved: #108760
|
@pytorchbot merge |
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 |
Stack from ghstack (oldest at bottom):
Long overdue this one. We may be able to change it in a few years :hopeful:.
BC-breaking note
This PR deprecates
torch.cross's default dim in favor oftorch.linalg.cross.A upgrade guide is added to the documentation for
torch.cross.Note this PR DOES NOT remove
torch.cross.Fixes #108664
cc @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @lezcano