Skip to content

[quant][graphmode] Move interpolate to general value ops#38162

Closed
jerryzh168 wants to merge 8 commits intogh/jerryzh168/305/basefrom
gh/jerryzh168/305/head
Closed

[quant][graphmode] Move interpolate to general value ops#38162
jerryzh168 wants to merge 8 commits intogh/jerryzh168/305/basefrom
gh/jerryzh168/305/head

Conversation

@jerryzh168
Copy link
Copy Markdown
Contributor

@jerryzh168 jerryzh168 commented May 8, 2020

Stack from ghstack:

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D21559810

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented May 8, 2020

💊 CI failures summary and remediations

As of commit 31b92e9 (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.

See how this bot performed.

This comment has been revised 18 times.

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
general_value_op_quant = 14
FileCheck().check_count("aten::quantize_per_tensor(", conv_op_quant + general_value_op_quant + 1, exactly=True) \
# number of quantize_per_tensor op for type
num_quant_by_op_type = {'conv': 2, 'common': 1, 'interpolate': 3}
Copy link
Copy Markdown
Contributor

@raghuramank100 raghuramank100 May 11, 2020

Choose a reason for hiding this comment

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

Can you explain why there are three quantize_per_tensor ops per interpolate op?. Is this because it calls different types of upsampling ops and each of them needs a separate quantize_per_tensor op at the output?

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 are some if statement in the code, and we have one quantize_per_tensor for each callsite of the aten ops inside if.

# number of quantize_per_tensor op for type
num_quant_by_op_type = {'conv': 2, 'common': 1, 'interpolate': 3}
# number of ops for each type
num_op_by_op_type = {'conv': 2, 'common': 16, 'interpolate': 3}
Copy link
Copy Markdown
Contributor

@raghuramank100 raghuramank100 May 11, 2020

Choose a reason for hiding this comment

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

It looks like there are 5 interpolate ops?

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.

probably need to rename this, 'interpolate' just means the ops that have three quantize_per_tensor..

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.

will rename this in later PR

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
# number of quantize_per_tensor op for type
num_quant_by_op_type = {'conv': 2, 'common': 1, 'interpolate': 3}
# number of ops for each type
num_op_by_op_type = {'conv': 2, 'common': 16, 'interpolate': 3}
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.

What does common mean here?

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 is refactored in later PRs, 'common' just mean typical ops..

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.

typical op will introduce 1 quantize_per_tensor call in the IR.

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo
Copy link
Copy Markdown
Contributor

vkuzo commented May 12, 2020

stamping per @jerryzh168 's request

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in e988b4f.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/305/head branch May 17, 2020 14:18
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary: Pull Request resolved: pytorch#38162

Test Plan: Imported from OSS

Differential Revision: D21559810

fbshipit-source-id: 2d975fc71f73c18f594108172850dfcfdb0cb9a0
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.

6 participants