Skip to content

Accuracy failures in test/xpu/test_decomp.py #2267

@libohao1201

Description

@libohao1201

🐛 Describe the bug

third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_baddbmm_xpu_float64 AssertionError: Tensor-likes are not close! ; Exception: Tensor-likes are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_logspace_tensor_overload_xpu_int16 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_logspace_tensor_overload_xpu_int32 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_logspace_tensor_overload_xpu_int64 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_logspace_xpu_int16 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_logspace_xpu_int32 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_logspace_xpu_int64 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_nn_functional_instance_norm_xpu_float64 AssertionError: Tensor-likes are not close! ; Exception: Tensor-likes are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_vdot_xpu_complex128 AssertionError: Scalars are not close! ; Exception: Scalars are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_comprehensive_vdot_xpu_complex64 AssertionError: Scalars are not close! ; Exception: Scalars are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_addmm_xpu_float64 AssertionError: Tensor-likes are not close! ; Exception: Tensor-likes are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_baddbmm_xpu_float64 AssertionError: Tensor-likes are not close! ; Exception: Tensor-likes are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_core_backward_baddbmm_xpu_float64 AssertionError: Tensor-likes are not close! ; Exception: Tensor-likes are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_logspace_tensor_overload_xpu_int16 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_logspace_tensor_overload_xpu_int32 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_logspace_tensor_overload_xpu_int64 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_logspace_xpu_int16 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_logspace_xpu_int32 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_logspace_xpu_int64 AssertionError: Tensor-likes are not equal! ; Exception: Tensor-likes are not equal!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_vdot_xpu_complex128 AssertionError: Scalars are not close! ; Exception: Scalars are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.TestDecompXPU test_quick_vdot_xpu_complex64 AssertionError: Scalars are not close! ; Exception: Scalars are not close!
third_party.torch-xpu-ops.test.xpu.test_decomp_new.DecompOneOffTestsXPU test_exponential_non_inf_xpu AssertionError: Tensor-likes are not close!
_____ TestDecompXPU.test_comprehensive_logspace_tensor_overload_xpu_int16 ______
Traceback (most recent call last):
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 1135, in test_wrapper
    return test(*args, **kwargs)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 1446, in only_fn
    return fn(self, *args, **kwargs)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 1560, in wrapper
    fn(*args, **kwargs)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 2361, in wrapper
    fn(*args, **kwargs)
  File "/home/gta/libohao/pt29_rc9/pytorch/third_party/torch-xpu-ops/test/xpu/test_decomp_new.py", line 627, in test_comprehensive
    self.do_cross_ref(device, dtype, op, run_all=True)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 1645, in wrapper
    fn(*args, **kwargs)
  File "/home/gta/libohao/pt29_rc9/pytorch/third_party/torch-xpu-ops/test/xpu/test_decomp_new.py", line 1052, in do_cross_ref
    func(*args, **kwargs)
  File "/home/gta/libohao/pt29_rc9/pytorch/third_party/torch-xpu-ops/test/xpu/test_decomp_new.py", line 930, in __torch_dispatch__
    op_assert_equal(
  File "/home/gta/libohao/pt29_rc9/pytorch/third_party/torch-xpu-ops/test/xpu/test_decomp_new.py", line 322, in op_assert_equal
    test_case.assertEqual(
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 4179, in assertEqual
    raise error_metas.pop()[0].to_error(  # type: ignore[index]
AssertionError: Tensor-likes are not equal!

Mismatched elements: 1 / 4 (25.0%)
Greatest absolute difference: 1 at index (2,)
Greatest relative difference: 0.03703703731298447 at index (2,)
logspace.Tensor_Tensor
args = (tensor(1, device='xpu:0'), tensor(4, device='xpu:0'), 4, 3.0)
kwargs = {'dtype': torch.int16, 'device': device(type='xpu', index=0), 'pin_memory': False}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/unittest/case.py", line 591, in run
    self._callTestMethod(testMethod)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
    method()
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3224, in wrapper
    method(*args, **kwargs)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 426, in instantiated_test
    result = test(self, **param_kwargs)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 1645, in wrapper
    fn(*args, **kwargs)
  File "/home/gta/.conda/envs/pt29_rc9/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 1147, in test_wrapper
    raise e_tracked from e
Exception: Caused by sample input at index 591: SampleInput(input=Tensor[size=(), device="xpu:0", dtype=torch.int64], args=(Tensor[size=(), device="xpu:0", dtype=torch.int64],4,3.0), kwargs={'dtype': 'torch.int16', 'device': "'xpu:0'"}, broadcasts_input=False, name='')

To execute this test, run the following from the base repo dir:
    PYTORCH_OPINFO_SAMPLE_INPUT_INDEX=591 PYTORCH_TEST_WITH_SLOW=1 python test/xpu/test_decomp_new.py TestDecompXPU.test_comprehensive_logspace_tensor_overload_xpu_int16


Versions

#2262

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions