-
Notifications
You must be signed in to change notification settings - Fork 57
Implementation of matmul for complex datatypes. #1992
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
base: main
Are you sure you want to change the base?
Implementation of matmul for complex datatypes. #1992
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements OneMKL-based kernels for complex datatype support in matrix multiplication operations (mm
, bmm
, addmm
, baddbmm
) on XPU devices. The implementation provides optimized BLAS operations for complex numbers using OneMKL library integration.
Key changes include:
- Addition of OneMKL-based complex matrix multiplication kernels
- Implementation of four core matrix operations with complex number support
- Conditional compilation support for OneMKL availability
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@CuiYifeng @kbinias Please review |
Follow up change with tests: #1993 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Implementation of kernels for complex datatype support for 4 ops:
mm
,bmm
,addmm
,baddbmm
using OneMKL.Current implementation of this ops for XPU is in
pytorch/aten/src/ATen/native/mkldnn/xpu/Blas.cpp
. Since OneMKL is a torch-xpu-ops dependency and is available only with USE_ONEMKL_XPU=ON (which is a default value). Implementation needs to be in torch-ops-xpu and kernels and TORCH_LIBRARY_IMPL are in ifdef macro to avoid complication error when OneMKL is not supported. Newly declared op will be called from existing torch implementation using c10::Dispatcher.This is part of: #1853