Skip to content

Title: [upstream_ut] AssertionError: RuntimeError not raised #2530

@daisyden

Description

@daisyden

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_vdot_invalid_args_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_dot_invalid_args_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_errors_dot_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_torch_xpu.TestTorch,test_swap_basic
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test__int_mm_errors_xpu
op_ut,third_party.torch-xpu-ops.test.xpu.test_linalg_xpu.TestLinalgXPU,test_linalg_lstsq_input_checks_xpu_float32
op_ut,third_party.torch-xpu-ops.test.xpu.test_ops_xpu.TestCommonXPU,test_errors_vdot_xpu

pytest_command:
cd && PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_torch_xpu.py -k test_swap_basic
cd && PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_linalg_xpu.py -k test_vdot_invalid_args_xpu
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_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
cd && PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_linalg_xpu.py -k test__int_mm_errors_xpu
cd && PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_linalg_xpu.py -k test_dot_invalid_args_xpu

Error Message:
AssertionError: RuntimeError not raised

Trace Example:

Command: cd <pytorch>  && PYTORCH_TEST_WITH_SLOW=1 pytest -v third_party/torch-xpu-ops/test/xpu/test_linalg_xpu.py -k test__int_mm_errors_xpu
Traceback (most recent call last):
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 591, in run
    self._callTestMethod(testMethod)
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
    method()
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3329, in wrapper
    method(*args, **kwargs)
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 428, in instantiated_test
    result = test(self, **param_kwargs)
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 1435, in only_fn
    return fn(slf, *args, **kwargs)
  File "/__w/torch-xpu-ops/torch-xpu-ops/pytorch/third_party/torch-xpu-ops/test/xpu/../../../../test/test_linalg.py", line 7736, in test__int_mm_errors
    self.assertRaisesRegex(RuntimeError,
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 4342, in assertRaisesRegex
    return super().assertRaisesRegex(expected_exception, expected_regex, *args, **kwargs)
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 1291, in assertRaisesRegex
    return context.handle('assertRaisesRegex', args, kwargs)
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 200, in handle
    with self:
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 223, in __exit__
    self._raiseFailure("{} not raised by {}".format(exc_name,
  File "/tmp/xpu-tool/Python/3.10.19/x64/lib/python3.10/unittest/case.py", line 163, in _raiseFailure
    raise self.test_case.failureException(msg)
AssertionError: RuntimeError not raised by <lambda>

To execute this test, run the following from the base repo dir:
    PYTORCH_TEST_WITH_SLOW=1 python ../../test/test_linalg.py TestLinalgXPU.test__int_mm_errors_xpu

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions