[quant][graphmode] Make aten::relu a general op#35420
Closed
jerryzh168 wants to merge 12 commits intogh/jerryzh168/273/basefrom
Closed
[quant][graphmode] Make aten::relu a general op#35420jerryzh168 wants to merge 12 commits intogh/jerryzh168/273/basefrom
aten::relu a general op#35420jerryzh168 wants to merge 12 commits intogh/jerryzh168/273/basefrom
Conversation
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: [ghstack-poisoned]
This was referenced Mar 25, 2020
Closed
This was referenced Mar 25, 2020
💊 CircleCI build failures summary and remediationsAs of commit a74f3ab (more details on the Dr. CI page): ✅ None of the build failures appear to be your fault 💚
🚧 1 upstream failure:These were probably caused by upstream breakages:
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. This comment has been revised 65 times. |
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
z-a-f
approved these changes
Mar 26, 2020
z-a-f
left a comment
There was a problem hiding this comment.
Do you need to change any calls in the unittests?
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
This was referenced Mar 27, 2020
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Summary: This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Reviewers: . Subscribers: Tasks: Tags: Differential Revision: [D20655309](https://our.internmc.facebook.com/intern/diff/D20655309) [ghstack-poisoned]
Contributor
|
This pull request has been merged in 67c3822. |
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#35420 This PR makes `aten::relu` a general op that doesn't require observation This means we also need to change the logic to support skipping intermediate values because this breaks `conv - relu` pattern if it is not followed by something that is quantizable since `conv` is quantizable, but we decide to skip observing between conv and relu. We changed the old `skip_values` to a new `delay_observation_map_` which records information that allow us to delay the observation of certain values until later points. In the case of `conv - relu` pattern, we delayed the observation of output of `conv` and observe the output of `relu` instead. Test Plan: python test/test_jit.py Imported from OSS Differential Revision: D20655309 fbshipit-source-id: 37dbe8a5e2f4cd7582ed67c405f9cf437dd00dbe
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:
quantized::add_scalar_reluandquantized::add_scalar_relu_out#35509 [quant][graphmode] Quantization support forquantized::add_scalar_reluandquantized::add_scalar_relu_outaten::conv3d#35347 [quant][graphmode] Quantization support foraten::conv3dquantized::add#35345 [quant][graphmode][fix] Add filter forquantized::addaten::relua general op #35420 [quant][graphmode] Makeaten::relua general opprepare_scripttakes original qconfig_dict #35335 [quant][graphmode]prepare_scripttakes original qconfig_dictSummary:
This PR makes
aten::relua general op that doesn't require observationThis means we also need to change the logic to support skipping intermediate values because
this breaks
conv - relupattern if it is not followed by something that is quantizablesince
convis quantizable, but we decide to skip observing between conv and relu.We changed the old
skip_valuesto a newdelay_observation_map_which records information thatallow us to delay the observation of certain values until later points. In the case of
conv - relupattern, we delayed the observation of output of
convand observe the output ofreluinstead.Test Plan:
python test/test_jit.py
Reviewers:
.
Subscribers:
Tasks:
Tags:
Differential Revision: D20655309