Skip to content

[quant][graphmode] Make aten::relu a general op#35420

Closed
jerryzh168 wants to merge 12 commits intogh/jerryzh168/273/basefrom
gh/jerryzh168/273/head
Closed

[quant][graphmode] Make aten::relu a general op#35420
jerryzh168 wants to merge 12 commits intogh/jerryzh168/273/basefrom
gh/jerryzh168/273/head

Conversation

@jerryzh168
Copy link
Copy Markdown
Contributor

@jerryzh168 jerryzh168 commented Mar 25, 2020

Stack from ghstack:

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

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]
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Mar 25, 2020

💊 CircleCI build failures summary and remediations

As of commit a74f3ab (more details on the Dr. CI page):


None of the build failures appear to be your fault 💚


  • 1/1 broken upstream at merge base 227beb9 since Mar 27

    Please rebase on the viable/strict branch (expand for instructions)

    If your commit is newer than viable/strict, you can try basing on an older, stable commit:

    git fetch https://github.com/pytorch/pytorch viable/strict
    git rebase --onto FETCH_HEAD $(git merge-base origin/master HEAD)
    

    If your commit is older than viable/strict:

    git fetch https://github.com/pytorch/pytorch viable/strict
    git rebase FETCH_HEAD
    

    Check out the recency history of this "viable master" tracking branch.


🚧 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.

See how this bot performed.

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]
Copy link
Copy Markdown

@z-a-f z-a-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]
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]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 67c3822.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/273/head branch April 1, 2020 14:20
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants