[XPU] Integer matmul tests fail due to unsupported int types in dot_xpu_mkl and oneDNN
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 107
Description
### 🐛 Describe the bug
Several matmul tests that check integer type support (int16, int32, int64) are skipped on XPU due to backend limitations. The dot_xpu_mkl and oneDNN kernels currently dispatch only for floating-point and complex types.
**Affected Tests (4 total):**
- `test_matmul_small_brute_force_1d_Nd[int16]`
- `test_matmul_small_brute_force_2d_Nd[int16]`
- `test_matmul_small_brute_force_3d_Nd[int16]`
- `test_corner_cases_of_cublasltmatmul[int16]`
**Root Cause:**
The XPU dispatch path for matmul operations (via dot_xpu_mkl and oneDNN kernels) does not support integer types (int16, int32, int64). When these types are used, the operation falls back to CPU execution or fails entirely on XPU devices.
python -m pytest test/test_linalg.py::TestLinalgDeviceXPU::test_matmul_small_brute_force_1d_Nd -xvs
branch: gplutop7:gplutopx/xpu-enable-test-cpp-extensions-aot
PR: https://github.com/pytorch/pytorch/pull/196597
### Versions
PyTorch version: 2.15.0a0+git32b89e1
Is debug build: False
CUDA used to build PyTorch: None
ROCm SDK used to build PyTorch: N/A
HIP used to build PyTorch: N/A
OS: Ubuntu 24.04.4 LTS (x86_64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version: Could not collect
CMake version: version 3.31.6
Libc version: glibc-2.39
Python version: 3.12.3 (main, Jul 15 2026, 23:46:41) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.17.0-1010-intel-x86_64-with-glibc2.39
Contributor guide
Research direction
Start with test/test_linalg.py and run the listed XPU matmul pytest command to reproduce the int16 failure. Then inspect the dot_xpu_mkl and oneDNN dispatch paths described in the issue. Done means the four affected integer matmul tests execute successfully on XPU without CPU fallback or failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100