Skip to content

Conversation

@z-a-f
Copy link

@z-a-f z-a-f commented Jun 30, 2020

Stack from ghstack:

Differential Revision: D22319417

@z-a-f z-a-f requested a review from jerryzh168 June 30, 2020 20:13
@dr-ci
Copy link

dr-ci bot commented Jun 30, 2020

💊 CI failures summary and remediations

As of commit 5ff4884 (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 or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 11 times.

z-a-f pushed a commit that referenced this pull request Jun 30, 2020
@z-a-f z-a-f added the oncall: quantization Quantization support in PyTorch label Jun 30, 2020
@z-a-f z-a-f requested a review from vkuzo June 30, 2020 20:19
int64_t quant_min,
int64_t quant_max) {
TORCH_CHECK(self.scalar_type() == ScalarType::Float);
TORCH_CHECK(scale.scalar_type() == ScalarType::Float,
Copy link
Contributor

Choose a reason for hiding this comment

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

double I think?

Copy link
Author

Choose a reason for hiding this comment

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

I think it's float, as per the iterator expectation here. Should I change them to double?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I thought this is quantize_per_tensor.

If this is float then probably zero_point should be int32_t, just to be consistent.

Copy link
Author

Choose a reason for hiding this comment

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

The problem is that in the kernel implementation it is float for scale and int64_t for the zero_point. I will have to change all the kernels

Copy link
Contributor

Choose a reason for hiding this comment

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

do you know why is that? it would be better to be consistent

Copy link
Author

Choose a reason for hiding this comment

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

I am not sure why the inconsistency, but I see some kernels use 64 bits and some 32.

z-a-f pushed a commit that referenced this pull request Jul 1, 2020
z-a-f pushed a commit that referenced this pull request Jul 6, 2020
@z-a-f z-a-f requested a review from jerryzh168 July 6, 2020 04:28
Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

Please make sure to change int64_t to int32_t in follow up PRs

z-a-f pushed a commit that referenced this pull request Jul 8, 2020
z-a-f pushed a commit that referenced this pull request Jul 8, 2020
@facebook-github-bot
Copy link
Contributor

@z-a-f merged this pull request in 402be85.

@facebook-github-bot facebook-github-bot deleted the gh/z-a-f/43/head branch July 16, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: quantization Quantization support in PyTorch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants