observers: use torch.all to check for valid min and max values#43151
Closed
vkuzo wants to merge 1 commit intogh/vkuzo/128/basefrom
Closed
observers: use torch.all to check for valid min and max values#43151vkuzo wants to merge 1 commit intogh/vkuzo/128/basefrom
vkuzo wants to merge 1 commit intogh/vkuzo/128/basefrom
Conversation
Summary: Using `torch.all` instead of `torch.sum` and length check. It's unclear whether the increase in perf (~5% for small inputs) is real, but should be a net benefit, especially for larger channel inputs. Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced Aug 17, 2020
vkuzo
added a commit
that referenced
this pull request
Aug 17, 2020
Summary: Using `torch.all` instead of `torch.sum` and length check. It's unclear whether the increase in perf (~5% for small inputs) is real, but should be a net benefit, especially for larger channel inputs. Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: ea10151 Pull Request resolved: #43151
jerryzh168
approved these changes
Aug 17, 2020
💊 CI failures summary and remediationsAs of commit b2dcec1 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 1 time. |
Contributor
|
This pull request has been merged in 57af1ec. |
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…ch#43151) Summary: Pull Request resolved: pytorch#43151 Using `torch.all` instead of `torch.sum` and length check. It's unclear whether the increase in perf (~5% for small inputs) is real, but should be a net benefit, especially for larger channel inputs. Test Plan: Imported from OSS Reviewed By: jerryzh168 Differential Revision: D23170426 fbshipit-source-id: ee5c25eb93cee1430661128ac9458a9c525df8e5
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:
Summary:
Using
torch.allinstead oftorch.sumand length check.yields a ~20% latency improvement on per-channel CUDA microbenchmarks for small tensors
(prev diff: P139074706, this diff: P139074994)
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D23170426