-
Notifications
You must be signed in to change notification settings - Fork 39
[WIP] Add mkl::linalg_lu relative Ops #1563
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?
Conversation
Tensor& self_, | ||
Tensor& pivots_, | ||
std::vector<int32_t>& infos_) { | ||
#ifdef USE_ONEMKL |
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.
Since BatchLinearAlgebra.cpp
is wrapped by USE_ONEMKL
, we can remove USE_ONEMKL
from functions.
const Tensor& pivots_, | ||
std::vector<int32_t>& infos_, | ||
TransposeType t) { | ||
#ifdef USE_ONEMKL |
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.
Ditto
} | ||
|
||
template <> | ||
int64_t mkl_getri_scratchpad<c10::complex<float>>( |
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.
The specialization of templates introduces redundancy. We'd better refine it in another PR.
// if (LU_new.has_value()) | ||
LU.copy_(LU_use); | ||
// return std::tuple<Tensor&, Tensor&, Tensor&>(LU, pivots, info); |
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.
Please remove debug code.
REGISTER_XPU_DISPATCH(lu_solve_stub, &native::xpu::lu_solve_mkl); | ||
REGISTER_XPU_DISPATCH(lu_factor_stub, &native::xpu::lu_factor_mkl); |
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.
Before build with oneMKL XPU is default ON, we still need fallback.
Follow #1511