-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[caffe2] avoid variable shadowing #111476
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/111476
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit fc391d9 with merge base fb88760 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D50407625 |
This PR needs a
|
This pull request was exported from Phabricator. Differential Revision: D50407625 |
da4702a
to
535c529
Compare
Summary: Some builds use -Wshadow and currently there is a compiler warning when building that file. Code inspection shows that `torch::autograd::impl::get_view_autograd_meta` simply extracts information from the passed object, which is `const`. Therefore the returned views should be the same all the time, and we can fetch the view only once. topic: not user facing Test Plan: CI Reviewed By: albanD Differential Revision: D50407625
535c529
to
fc391d9
Compare
This pull request was exported from Phabricator. Differential Revision: D50407625 |
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
Summary: Some builds use -Wshadow and currently there is a compiler warning when building that file. Code inspection shows that `torch::autograd::impl::get_view_autograd_meta` simply extracts information from the passed object, which is `const`. Therefore the returned views should be the same all the time, and we can fetch the view only once. Test Plan: CI NOTE: please advise for a more comprehensive test plan. Differential Revision: D50407625 Pull Request resolved: pytorch#111476 Approved by: https://github.com/Skylion007, https://github.com/albanD
Summary: Some builds use -Wshadow and currently there is a compiler warning when building that file. Code inspection shows that `torch::autograd::impl::get_view_autograd_meta` simply extracts information from the passed object, which is `const`. Therefore the returned views should be the same all the time, and we can fetch the view only once. Test Plan: CI NOTE: please advise for a more comprehensive test plan. Differential Revision: D50407625 Pull Request resolved: pytorch#111476 Approved by: https://github.com/Skylion007, https://github.com/albanD
Summary:
Some builds use -Wshadow and currently there is a compiler warning when building that file.
Code inspection shows that
torch::autograd::impl::get_view_autograd_meta
simply extracts information from the passed object, which isconst
. Therefore the returned views should be the same all the time, and we can fetch the view only once.Test Plan:
CI
NOTE: please advise for a more comprehensive test plan.
Differential Revision: D50407625