Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
skippedUsed for temp UT failure to parallel fixUsed for temp UT failure to parallel fix
Milestone
Description
Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_float64
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_float32
pytest_command:
&& PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_linalg_xpu.py -k test_linalg_lstsq_input_checks_xpu_float32
cd && PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_linalg_xpu.py -k test_linalg_lstsq_input_checks_xpu_float64
Error Message:
RuntimeError: torch.linalg.lstsq: parameter driver should be one of (gels, gelsy, gelsd, gelss)
Trace Example:
PYTORCH_TEST_WITH_SLOW=1 pytest -v test_linalg_xpu.py -k test_linalg_lstsq_input_checks_xpu_float32
============================================================================================= test session starts ==============================================================================================
platform linux -- Python 3.12.3, pytest-9.0.2, pluggy-1.6.0 -- /home/gta/venv2/bin/python
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /home/gta/pytorch
configfile: pytest.ini
plugins: hypothesis-6.151.9
collected 1665 items / 1664 deselected / 1 selected
test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_float32 FAILED [100%]
=================================================================================================== FAILURES ===================================================================================================
___________________________________________________________________________ TestLinalgXPU.test_linalg_lstsq_input_checks_xpu_float32 ___________________________________________________________________________
RuntimeError: torch.linalg.lstsq: parameter `driver` should be one of (gels, gelsy, gelsd, gelss)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
yield
File "/usr/lib/python3.12/unittest/case.py", line 634, in run
self._callTestMethod(testMethod)
File "/usr/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
if method() is not None:
^^^^^^^^
File "/home/gta/pytorch/torch/testing/_internal/common_utils.py", line 3535, in wrapper
method(*args, **kwargs)
File "/home/gta/pytorch/torch/testing/_internal/common_device_type.py", line 535, in instantiated_test
result = test(self, **param_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gta/pytorch/torch/testing/_internal/common_device_type.py", line 1367, in dep_fn
return fn(slf, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gta/pytorch/torch/testing/_internal/common_device_type.py", line 1367, in dep_fn
return fn(slf, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gta/pytorch/third_party/torch-xpu-ops/test/xpu/../../../../test/test_linalg.py", line 611, in test_linalg_lstsq_input_checks
with self.assertRaisesRegex(RuntimeError, '`driver` other than `gels` is not supported on CUDA'):
File "/usr/lib/python3.12/unittest/case.py", line 276, in __exit__
self._raiseFailure('"{}" does not match "{}"'.format(
File "/usr/lib/python3.12/unittest/case.py", line 200, in _raiseFailure
raise self.test_case.failureException(msg)
AssertionError: "`driver` other than `gels` is not supported on CUDA" does not match "torch.linalg.lstsq: parameter `driver` should be one of (gels, gelsy, gelsd, gelss)"
To execute this test, run the following from the base repo dir:
PYTORCH_TEST_WITH_SLOW=1 python ../../test/test_linalg.py TestLinalgXPU.test_linalg_lstsq_input_checks_xpu_float32
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
--------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
/home/gta/pytorch/third_party/torch-xpu-ops/test/xpu/../../../../test/test_linalg.py:535: UserWarning: Aten Op fallback from XPU to CPU happends. This may have performance implications. If need debug the fallback ops please set environment variable `PYTORCH_DEBUG_XPU_FALLBACK=1` (Triggered internally at /home/gta/pytorch/build/xpu/ATen/RegisterXPU_0.cpp:54907.)
torch.linalg.lstsq(a, b)[0],
=========================================================================================== short test summary info ============================================================================================
FAILED test_linalg_xpu.py::TestLinalgXPU::test_linalg_lstsq_input_checks_xpu_float32 - AssertionError: "`driver` other than `gels` is not supported on CUDA" does not match "torch.linalg.lstsq: parameter `driver` should be one of (gels, gelsy, gelsd, gelss)"
Metadata
Metadata
Assignees
Labels
skippedUsed for temp UT failure to parallel fixUsed for temp UT failure to parallel fix
Activity
BBBela commentedon May 18, 2026
It looks like the same test cases are already covered in #2817
This seems like a duplicate.