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 correct int type to the quantized weights matrix in MatMulInteger #29

Merged

Conversation

peterbohm
Copy link
Contributor

Assignment of the quantized weights to B matrix in MatMulInteger, was casting them to the same int type as the quantized input (uint8).
This created an issue for models with weights quantized to int8 (e.g. using onnxruntime.quantization.quantize_dynamic()).
This commit checks for the actual data type of the weights and then uses that during assignment to B.

src/nodes/matmulinteger.h Outdated Show resolved Hide resolved
@kraiskil
Copy link
Owner

Thanks for the PR.

ONNX specifies the two inputs to be of different types, so this is a clear bug in onnx2c. Good to merge.

@kraiskil kraiskil merged commit bdfe0f7 into kraiskil:master Feb 13, 2023
@kraiskil
Copy link
Owner

Thanks :)

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.

2 participants