-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
avoid extra copies in batchnorm inference by introducing a new op, _native_batch_norm_legit_no_training #94946
Conversation
…ative_batch_norm_legit_no_training [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/94946
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit cc46919: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
this is horrible but I am OK with getting it in for release. Is someone signed up for batch norm consolidation
… new op, _native_batch_norm_legit_no_training" [ghstack-poisoned]
added a test |
…ative_batch_norm_legit_no_training ghstack-source-id: 158da4bfbd9fc40a50282c00cda4981e1c30078e Pull Request resolved: #94946
@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 |
Merge failedReason: 3 mandatory check(s) failed (Rule
Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job |
std::tuple<Tensor, Tensor, Tensor> _batch_norm_legit_no_training( | ||
const Tensor& self, const c10::optional<Tensor>& weight_opt, const c10::optional<Tensor>& bias_opt, | ||
const Tensor& running_mean, const Tensor& running_var, double momentum, double eps) { | ||
return batch_norm_cpu(self, weight_opt, bias_opt, const_cast<Tensor&>(running_mean), const_cast<Tensor&>(running_var), /*train=*/false, momentum, eps); |
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.
why is this cpu only?
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.
Whoops 😅 will fix when i get back to my laptop.
although this code path will never actually be hit in the PT2 workflow (since the decomp for this new op is automatically opted into by inductor + any backends that run “core aten decomps”)
… new op, _native_batch_norm_legit_no_training" [ghstack-poisoned]
The extra |
@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 |
Merge failedReason: 2 mandatory check(s) failed. The first few are:
Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job Failing merge rule: Core Maintainers |
… new op, _native_batch_norm_legit_no_training" [ghstack-poisoned]
…ative_batch_norm_legit_no_training ghstack-source-id: 83baffae010d27b4ced28189def1afbe47db2198 Pull Request resolved: #94946
@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 |
…w op, _native_batch_norm_legit_no_training (pytorch#94946)" This reverts commit 68600fc.
…ative_batch_norm_legit_no_training (pytorch#94946) Pull Request resolved: pytorch#94946 Approved by: https://github.com/ezyang
Stack from ghstack (oldest at bottom):