[quant][graphmode] Fix a corner case in handling if in insert_observers#39615
[quant][graphmode] Fix a corner case in handling if in insert_observers#39615jerryzh168 wants to merge 9 commits intogh/jerryzh168/336/basefrom
if in insert_observers#39615Conversation
…vers Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…vers Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: aefa49d Pull Request resolved: #39615
💊 CI failures summary and remediationsAs of commit 9f9a5c1 (more details on the Dr. CI page):
Extra GitHub checks: 1 failed
ci.pytorch.org: 1 failedThis 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 38 times. |
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…vers Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 91b0ce8 Pull Request resolved: #39615
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
| x = self.conv(x) | ||
| # x is already observed | ||
| if self.cond: | ||
| x = torch.flatten(x) |
There was a problem hiding this comment.
If this operation where instead
if self.cond:
x = self.conv1(x)
return xyou would need to insert an observer after conv1. Is this tested?
There was a problem hiding this comment.
not yet, I can add the test
There was a problem hiding this comment.
this does not work since different branches of if not quantized the same way
There was a problem hiding this comment.
there is a conflict of rules at the moment if we want to support this, we can probably think about it later
There was a problem hiding this comment.
Please file an issue to track this issue down the road.
raghuramank100
left a comment
There was a problem hiding this comment.
A question on test coverage.
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942110](https://our.internmc.facebook.com/intern/diff/D21942110) [ghstack-poisoned]
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942110](https://our.internmc.facebook.com/intern/diff/D21942110) [ghstack-poisoned]
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942110](https://our.internmc.facebook.com/intern/diff/D21942110) [ghstack-poisoned]
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942110](https://our.internmc.facebook.com/intern/diff/D21942110) [ghstack-poisoned]
…nsert_observers" Summary: corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D21942110](https://our.internmc.facebook.com/intern/diff/D21942110) [ghstack-poisoned]
|
This pull request has been merged in 2d589bc. |
…vers (pytorch#39615) Summary: Pull Request resolved: pytorch#39615 corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87 (Note: this ignores all push blocking failures!) Test Plan: Imported from OSS Differential Revision: D21942110 fbshipit-source-id: 9522032957575662d2648db2a41fa5410e8d1e3a
Stack from ghstack:
aten::append#39644 [quant][graphmode] Support quantization foraten::appendifin insert_observers #39615 [quant][graphmode] Fix a corner case in handlingifin insert_observersSummary:
corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D21942110