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

Implement Tensor.equal and torch.equal for QTensor #294

Merged
merged 7 commits into from
Aug 24, 2024
Merged

Conversation

dacorvo
Copy link
Collaborator

@dacorvo dacorvo commented Aug 24, 2024

What does this PR do?

This implements QTensor.equal and torch.equal, to allow an explicit comparison of quantized tensors.

Before that pull-request, comparing quantized tensors led to a fallback, ie dequantized tensors were compared.

This was slower, but most importantly this did not allow to verify if the quantized tensors were using the same packing (for configurations were optimized kernels must be used).

This is especially useful when requantizing a serialized model to make sure it uses the optimized packing.

@dacorvo dacorvo merged commit f3b39ce into main Aug 24, 2024
16 checks passed
@dacorvo dacorvo deleted the qtensor_torch_equal branch August 24, 2024 13:01
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.

1 participant