-
Notifications
You must be signed in to change notification settings - Fork 25.6k
graph mode: add hardswish inplace handling #40284
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
Summary: WIP Test Plan: ``` python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 0f5fed7 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 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 30 times. |
Summary: WIP need to fix inplace before landing. graph comparison: https://www.internalfb.com/intern/paste/P133715227/ Test Plan: ``` python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
else: | ||
# module under test can contain in-place ops, and we depend on | ||
# input data staying constant for comparisons | ||
data_copy = copy.deepcopy(data) |
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.
makes sense, wonder why we didn't discover this in other tests
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.
oh, maybe this is the first one modifying input data
for tracing in [True, False]: | ||
m = self.checkGraphModeOp(hardswish, data, "quantized::hardswish", tracing) | ||
FileCheck().check_not("aten::hardswish") \ | ||
.run(m.graph) | ||
for m in modules: |
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.
nit: you can use itertools to reduce identation, see other test cases in the file
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.
LG
Summary: Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish. Test Plan: ``` python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish ``` Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628) [ghstack-poisoned]
Summary: Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish. Test Plan: ``` python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish ``` Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628) [ghstack-poisoned]
Summary: Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish. Test Plan: ``` python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish ``` Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628) [ghstack-poisoned]
Summary: Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish. Test Plan: ``` python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish ``` Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22140628](https://our.internmc.facebook.com/intern/diff/D22140628) [ghstack-poisoned]
This pull request has been merged in ab8a99b. |
Stack from ghstack:
Summary:
Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D22140628