intel / intel/torch-xpu-ops

New failures in test_linalg_xpu.py, RuntimeError: Cannot set preferred backend to cuSOLVER if PyTorch has not been compiled with cuSOLVER.

Open
#5,290 1 comment 0 reactions 0 assignees View on GitHub
skipped_bmg
Dominant language
Python
Stars
113
Forks
129
Avg merge
5d 9h
Merged PRs (30d)
112

Description

### 🐛 Describe the bug

Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_batched_lu_stability_large_inputs_xpu_complex128
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_batched_lu_stability_large_inputs_xpu_complex64
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_batched_lu_stability_large_inputs_xpu_float32
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_batched_lu_stability_large_inputs_xpu_float64

## ErrorLog
```bash
_ TestLinalgXPU.test_linalg_batched_lu_stability_large_inputs_xpu_complex128 __
[gw2] linux -- Python 3.10.21 /__w/torch-xpu-ops/torch-xpu-ops/.venv/bin/python
Traceback (most recent call last):
File "/__w/torch-xpu-ops/torch-xpu-ops/pytorch/third_party/torch-xpu-ops/test/xpu/../../../../test/test_linalg.py", line 5898, in test_linalg_batched_lu_stability_large_inputs
torch.backends.cuda.preferred_linalg_library("cusolver")
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/backends/cuda/__init__.py", line 276, in preferred_linalg_library
torch._C._set_linalg_preferred_backend(_LinalgBackends[backend])
RuntimeError: Cannot set preferred backend to cuSOLVER if PyTorch has not been compiled with cuSOLVER.
```

## Pytorch
[81deebd](https://github.com/pytorch/pytorch/commit/81deebd0497f96495b563af4155b99b372d8022c)
## Torch-xpu-ops
5cdd4e46bd058506f1620944b27b87056e415cc9

### Versions

Detail
Collecting environment information...
PyTorch version: 2.15.0a0+git81deebd
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

[pip3] intel-opencl-rt==2026.1.0
[pip3] intel-openmp==2026.1.0
[pip3] intel-pti==1.0.1
[pip3] intel-sycl-rt==2026.1.0
[pip3] mkl==2026.1.0
[pip3] mypy==1.16.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.24.4
[pip3] nvidia-cuda-cupti==13.3.75
[pip3] oneccl==2022.1.1
[pip3] oneccl-devel==2022.1.1
[pip3] onemkl-license==2026.1.0
[pip3] onemkl-sycl-blas==2026.1.0
[pip3] onemkl-sycl-dft==2026.1.0
[pip3] onemkl-sycl-lapack==2026.1.0
[pip3] onemkl-sycl-rng==2026.1.0
[pip3] onemkl-sycl-sparse==2026.1.0
[pip3] onnx==1.21.0
[pip3] onnx-ir==0.1.16
[pip3] onnxscript==0.6.2
[pip3] optree==0.13.0
[pip3] tbb==2023.1.0
[pip3] tcmlib==1.5.0
[pip3] torch==2.15.0a0+git81deebd
[pip3] torchao==0.19.0.dev20260909+xpu
[pip3] torchaudio==2.11.0a0+b85c99c
[pip3] torchvision==0.30.0a0+ac8d215
[pip3] triton-xpu==3.8.0+git1e2d42a0
[pip3] umf==1.1.0
[conda] No relevant packages

Contributor guide

Open the contributing guide

Research direction

Start at pytorch/test/test_linalg.py around line 5898 and run the four named TestLinalgXPU cases in test_linalg_xpu.py. Investigate why the tests select cuSOLVER in this build, then make the cases pass in the reported XPU environment without requiring an unavailable backend.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.