Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quantization #9

Merged
merged 2 commits into from
Mar 28, 2019
Merged

Conversation

zrphercule
Copy link
Collaborator

rt, add foxi quantization.
pls sync this to fbcode asap, thanks.

@zrphercule zrphercule requested review from yinghai and houseroad March 28, 2019 20:30
foxi/onnxifi.h Outdated
* If it is a quantized tensor, the value should be set to 1.
* By default it should be set to 0.
*/
unsigned char is_quantized;
Copy link
Owner

Choose a reason for hiding this comment

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

why not bool or uint8_t?

Copy link
Collaborator

Choose a reason for hiding this comment

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

C?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cause it is C?

Copy link
Owner

@houseroad houseroad Mar 28, 2019

Choose a reason for hiding this comment

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

we already use int32_t anyway, why hesitate using uint8_t?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's true.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then let me try uint8_t? didnt see the difference...

Copy link
Owner

Choose a reason for hiding this comment

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

it's weird to use char to store the number, which means you need explict conversion. So if it's possible, that's use uint8 instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, let me change it.

Copy link
Owner

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

LGTM

@zrphercule zrphercule merged commit 81e1683 into houseroad:master Mar 28, 2019
@zrphercule zrphercule deleted the add_foxi_quantization branch March 28, 2019 23:21
@yinghai
Copy link
Collaborator

yinghai commented Mar 28, 2019

How to sync it back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants