-
Notifications
You must be signed in to change notification settings - Fork 22.9k
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
Implement Quantized Version of Threshold Function #39352
Conversation
This pull request was exported from Phabricator. Differential Revision: D21822446 |
💊 CI failures summary and remediationsAs of commit 4a7f9b5 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 1 failure confirmed as flaky and can be ignored:
This 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 17 times. |
This pull request was exported from Phabricator. Differential Revision: D21822446 |
e83fb68
to
c4138af
Compare
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.
Looks good -- minor changes
aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp
Outdated
Show resolved
Hide resolved
aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp
Outdated
Show resolved
Hide resolved
c4138af
to
61b8523
Compare
This pull request was exported from Phabricator. Differential Revision: D21822446 |
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 -- will leave it to other reviewers, in case they have comments
(optional) since output quantization parameters are set equal to the input ones, would it make sense to do this in the quantized domain without doing dq -> float -> q? Doesn't have to be in scope for this task. |
61b8523
to
b3702bf
Compare
This pull request was exported from Phabricator. Differential Revision: D21822446 |
Summary: Pull Request resolved: pytorch#39352 In this task, the quantized backend of the kernel is implemented for the threshold function, which clamps the entries in a tensor less than or equal to a given threshold to be a specified value. The corresponding Python implementation and unit test are also added. Test Plan: 1. On a devserver, build PyTorch from source by running the command `buck build mode/dev //caffe2:torch` 2. Run the unit test throught the command `buck test mode/dev //caffe2/test:quantization -- test_qthreshold` Reviewed By: z-a-f Differential Revision: D21822446 fbshipit-source-id: 4b3e86508642ec8c30d5087e3b76c026fac72c54
b3702bf
to
4a7f9b5
Compare
This pull request was exported from Phabricator. Differential Revision: D21822446 |
This pull request has been merged in 6a75f65. |
Summary:
In this task, the quantized backend of the kernel is implemented for the threshold function, which clamps the entries in a tensor less than or equal to a given threshold to be a specified value.
The corresponding Python implementation and unit test are also added.
Test Plan:
buck build mode/dev //caffe2:torch
buck test mode/dev //caffe2/test:quantization -- test_qthreshold
Differential Revision: D21822446