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

Understand the document on block level APIs(https://github.com/oneapi-src/oneDNN/pull/1852) #1949

Closed
akote123 opened this issue Jun 7, 2024 · 1 comment
Labels

Comments

@akote123
Copy link

akote123 commented Jun 7, 2024

@mgouicem, I am going through the document in
https://github.com/mgouicem/oneDNN/tree/mgouicem/rfcs/brgemm/rfcs/20240326-block-level-api
to understand more. There is note mentioned that "or LLM optimizations, and "pure" matrix multiplication, batch-reduction is typically not necessary unless A and B are large and require K-blocking. This can be observed in current IPEX implementations using libxsmm for FlashAttention, Multi-Head Attention and Weights-only-Quantization Matmul.",
I wanted to understand :
1.In default pytorch uses mkl for matmul computation, So does IPEX uses any heuristic to switch between mkl and libxsmm or it uses only libxsmm for matmuls?
2. As in Icelake onednn is not used for matmuls in pytorch, does brgemm is refers to implementation inside mkl?

@mgouicem
Copy link
Contributor

mgouicem commented Jun 7, 2024

Thanks for the interest @akote123

  1. Adding @Xia-Weiwen for ipex part. I believe that libxsmm ukernels are used only for some complex fused patterns. There is ongoing work with ipex team to migrate to the new oneDNN brgemm APIs.
  2. Not sure I understand the question. @jgong can better address the details about pytorch internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants