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

DOT via GEMM TPP #803

Open
alheinecke opened this issue Aug 6, 2023 · 5 comments
Open

DOT via GEMM TPP #803

alheinecke opened this issue Aug 6, 2023 · 5 comments
Assignees

Comments

@alheinecke
Copy link
Collaborator

For various LLM and GNN operators, we need vector a fast dot. Right now we have only very slow A^T GEMM for M=1 or we have to run a sequence of unary/binary TPPs.

Plan for improvement: Add fast A^T GEMM for M=1 which uses an inner-product approach + vector reduce in the end.

@hfp
Copy link
Collaborator

hfp commented Aug 14, 2023

General Q (raised by others), this would not benefit from AMX as the latter needs matrices/tiles to benefit from reuse etc.
Is this a correct assumption?

@egeor
Copy link
Collaborator

egeor commented Aug 14, 2023 via email

@hfp
Copy link
Collaborator

hfp commented Aug 14, 2023

DOT and GEMV are BW BOUND ops, so AMX is irrelevant

Indeed. However, this came up in a context of "batched dot-products" which in turn can be thought like a matrix multiplication. I still wonder if there is something useful in it and if I should get the exact use case.

@egeor
Copy link
Collaborator

egeor commented Aug 14, 2023 via email

@hfp
Copy link
Collaborator

hfp commented Aug 14, 2023

For the record, this can be related to https://github.com/vondele/Stockfish/tree/amx_v1.

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

3 participants