-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[proto] Small improvement for tensor equalize op #6738
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
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.
LGTM, thanks! Feel free to merge on green CI.
lut.clamp_(0, 255) | ||
lut = lut.to(torch.uint8) |
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.
Could you add a comment here explaining what we discussed offline in regards to why moving clamp and to here leads to a faster result?
There can be more improvement if we vectorize histogram computation with |
Summary: * [proto] Small improvement for tensor equalize op * Fix code formatting * Added a comment on the ops Reviewed By: NicolasHug Differential Revision: D40427464 fbshipit-source-id: f40623c83cebe269717151ae52f1fe9af47a3bde
Main:
This PR:
Here is cprof logs to see number of calls reduction:
Main (12adc54):
This PR: