Skip to content

[quant][graphmode] Fix a corner case in handling if in insert_observers#39615

Closed
jerryzh168 wants to merge 9 commits intogh/jerryzh168/336/basefrom
gh/jerryzh168/336/head
Closed

[quant][graphmode] Fix a corner case in handling if in insert_observers#39615
jerryzh168 wants to merge 9 commits intogh/jerryzh168/336/basefrom
gh/jerryzh168/336/head

Conversation

@jerryzh168
Copy link
Copy Markdown
Contributor

@jerryzh168 jerryzh168 commented Jun 6, 2020

Stack from ghstack:

Summary:
corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D21942110

…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]
jerryzh168 added a commit that referenced this pull request Jun 6, 2020
…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
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Jun 6, 2020

💊 CI failures summary and remediations

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


  • 2/2 failures possibly* introduced in this PR
    • 2/2 non-CircleCI failure(s)

Extra GitHub checks: 1 failed


ci.pytorch.org: 1 failed


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.

See how this bot performed.

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]
jerryzh168 added a commit that referenced this pull request Jun 6, 2020
…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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this operation where instead

if self.cond:
  x = self.conv1(x)
return x

you would need to insert an observer after conv1. Is this tested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not yet, I can add the test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this does not work since different branches of if not quantized the same way

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

there is a conflict of rules at the moment if we want to support this, we can probably think about it later

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please file an issue to track this issue down the road.

Copy link
Copy Markdown
Contributor

@raghuramank100 raghuramank100 left a comment

Choose a reason for hiding this comment

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

A question on test coverage.

@jerryzh168 jerryzh168 requested a review from raghuramank100 June 8, 2020 23:08
…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]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 2d589bc.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/336/head branch June 14, 2020 14:16
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…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
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