-
Notifications
You must be signed in to change notification settings - Fork 39
Enable _linalg_det
, _linalg_slogdet
and _linalg_solve_ex
related operations on xpu
#1660
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
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 pull request introduces optimized XPU-specific support for determinant and sign/log-determinant operations by dispatching to dedicated XPU kernels and removing fallbacks. It also updates the test suite and skip lists accordingly to reflect the new support.
- Added YAML entries for _linalg_det and _linalg_slogdet with structured delegates and XPU-specific dispatch.
- Updated test files to include new LU-family and LU-solve tests while removing obsolete fallback tests.
- Removed fallback implementations and adjusted skip lists in test files.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
yaml/native/native_functions.yaml | Added structured function entries for _linalg_det and _linalg_slogdet with XPU dispatch support. |
test/xpu/test_linalg_xpu.py | Introduced new tests for LU-family and LU-solve operations; refactored imports and test registration. |
test/xpu/skip_list_common.py | Removed skip tests related to linalg_det and linalg_slogdet operations. |
src/ATen/native/xpu/mkl/BatchLinearAlgebra.h | Defined new MKL-based linear algebra function prototypes for XPU. |
src/ATen/native/xpu/BatchLinearAlgebra.cpp | Added XPU kernel implementations for SVD, LU solve, and LU factor with CPU fallback support. |
Files not reviewed (1)
- src/ATen/native/xpu/XPUFallback.template: Language not supported
_linalg_det
and _linalg_slogdet
related operations on xpu_linalg_det
, _linalg_slogdet
and _linalg_solve_ex
related operations on xpu
This pull request stacks on #1563. It introduces support for
_linalg_det
,_linalg_slogdet
and_linalg_solve_ex
related operations on XPU devices:_linalg_det
&_linalg_det.result
_linalg_slogdet
&_linalg_slogdet.sign
_linalg_solve_ex.result
It also removes fallback implementations for these operations in favor of optimized XPU-specific implementations. Corresponding tests have been updated to reflect the new support.
New XPU Kernel Implementations:
Since
_linalg_det
,_linalg_slogdet
and_linalg_solve_ex
calllinalg_lu_factor_ex.out
underneath, which has been implemented in #1563, no new kernels need to be added in this pull request. Only dispatching these operations inthird_party/torch-xpu-ops/yaml/native/native_functions.yaml
would work.Removal of Fallbacks:
Removed fallback entries for
_linalg_det
,_linalg_slogdet
and_linalg_solve_ex
related operations fromthird_party/torch-xpu-ops/src/ATen/native/xpu/XPUFallback.template
. These operations now have dedicated XPU implementations.Test Adjustments:
Updated the skip list in
test/xpu/skip_list_common.py
to remove passed and removedlinalg_det
,linalg_slogdet
and_linalg_solve_ex
related UTs.Fix #1597