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

Optimization Opportunity: PSADBW and VPDPBUSD #11

Open
Adam-Vandervorst opened this issue Aug 23, 2023 · 0 comments
Open

Optimization Opportunity: PSADBW and VPDPBUSD #11

Adam-Vandervorst opened this issue Aug 23, 2023 · 0 comments

Comments

@Adam-Vandervorst
Copy link
Owner

Adam-Vandervorst commented Aug 23, 2023

A good amount of silicon goes to video processing compression and more recently to neural network inference: this gives us very fast compound instructions.
An example of the former is https://www.felixcloutier.com/x86/psadbw which computes the L1 norm between two byte-vectors.
The latter, part of VNNI, is https://www.felixcloutier.com/x86/vpdpbusd which is a convolution of a byte vector with an extra addition.

They're similar in that they compute similarity, and I believe this can be exploited in the window threshold-generalization and metrics like jaccard, cosine, and mutual_information.

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

No branches or pull requests

1 participant