-
Notifications
You must be signed in to change notification settings - Fork 39
Add mkl::linalg_svd relative Ops #1511
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
yucai-intel
commented
Mar 26, 2025
•
edited
Loading
edited
- linalg_svd
- linalg_svd.U
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 reactivate some skipped cases such as https://github.com/intel/torch-xpu-ops/blob/main/test/xpu/skip_list_common.py#L1397. Otherwise, CI cannot test with these svd cases.
#if defined(USE_ONEMKL) | ||
#include <ATen/native/BatchLinearAlgebra.h> | ||
#include <ATen/native/DispatchStub.h> | ||
#include <ATen/native/Resize.h> | ||
#include <ATen/native/TensorIterator.h> | ||
#include <ATen/native/xpu/mkl/BatchLinearAlgebra.h> | ||
|
||
#include <ATen/ops/_linalg_svd.h> | ||
#include <ATen/ops/_linalg_svd_meta.h> | ||
#include <ATen/ops/_linalg_svd_native.h> | ||
|
||
namespace at::native { | ||
|
||
REGISTER_XPU_DISPATCH(svd_stub, &native::xpu::svd_mkl); | ||
|
||
} // namespace at::native | ||
#endif // 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.
When USE_ONEMKL=OFF
, how can we call linalg_svd on XPU?
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.
@yucai-intel _linalg_svd.U
is registered directly instead of using stub. All svd related changes has been removed from native_functions.yaml
.
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.
For ops registered to stub, we will keep their fallback in XPUFallback.template
for USE_ONEMKL=OFF
.
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.
Added float64 related test cases.
Local tests are all passed or automatically skipped.
2a0518c
to
56cebb3
Compare