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 a quantize_symmetric operation and the corresponding CPU kernel #83

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

dacorvo
Copy link
Collaborator

@dacorvo dacorvo commented Feb 9, 2024

This is mainly to test the library design with a different operation.

The quantize_symmetric operation simply rescales and maps the source tensor to either int8 of float8.

The pull-request also includes a minimal C++ kernel for CPU devices, that only supports per-tensor int8 quantization for now.

On a Macbook air, the optimized kernel is only 10 % faster than the default implementation using python torch operators.

@dacorvo dacorvo merged commit 36124db into main Feb 9, 2024
3 checks passed
@dacorvo dacorvo deleted the quantize_kernel branch February 9, 2024 15:26
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