Skip to content

[riscv64][test]test_tensor_creation_ops #14

@XYenChi

Description

@XYenChi

🐛 Describe the bug

python test/test_tensor_creation_ops.py

FAIL: test_float_to_int_conversion_nonfinite_cpu_int16 (__main__.TestTensorCreationCPU.test_float_to_int_conversion_nonfinite_cpu_int16)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_utils.py", line 3370, in wrapper
    method(*args, **kwargs)
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_device_type.py", line 430, in instantiated_test
 method(*args, **kwargs)
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_device_type.py", line 430, in instantiated_test
    result = test(self, **param_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_device_type.py", line 1456, in only_fn
    return fn(slf, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyixuan/pytorch/test/test_tensor_creation_ops.py", line 1120, in test_float_to_int_conversion_nonfinite
    self._float_to_int_conversion_helper(vals, device, dtype, refs)
  File "/home/chenyixuan/pytorch/test/test_tensor_creation_ops.py", line 1064, in _float_to_int_conversion_helper
    self.assertEqual(refs, t.cpu())
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_utils.py", line 4365, in assertEqual
    raise error_metas.pop()[0].to_error(  # type: ignore[index]
AssertionError: Tensor-likes are not equal!
                                                                                                                                                                                                                 Mismatched elements: 2 / 3 (66.7%)
Greatest absolute difference: 1 at index (1,)
Greatest relative difference: 1.0 at index (1,)                                                                                                                                                                  
To execute this test, run the following from the base repo dir:
    python test/test_tensor_creation_ops.py TestTensorCreationCPU.test_float_to_int_conversion_nonfinite_cpu_int16

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0                                                                                                                                       
======================================================================
FAIL: test_float_to_int_conversion_nonfinite_cpu_int32 (__main__.TestTensorCreationCPU.test_float_to_int_conversion_nonfinite_cpu_int32)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_utils.py", line 3370, in wrapper
    method(*args, **kwargs)
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_device_type.py", line 430, in instantiated_test
    result = test(self, **param_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_device_type.py", line 1456, in only_fn
    return fn(slf, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chenyixuan/pytorch/test/test_tensor_creation_ops.py", line 1120, in test_float_to_int_conversion_nonfinite
    self._float_to_int_conversion_helper(vals, device, dtype, refs)
  File "/home/chenyixuan/pytorch/test/test_tensor_creation_ops.py", line 1064, in _float_to_int_conversion_helper
    self.assertEqual(refs, t.cpu())
  File "/home/chenyixuan/pytorch/torch/testing/_internal/common_utils.py", line 4365, in assertEqual
    raise error_metas.pop()[0].to_error(  # type: ignore[index]
AssertionError: Tensor-likes are not equal!

Mismatched elements: 2 / 3 (66.7%)
Greatest absolute difference: 4294967295 at index (1,)
Greatest relative difference: 2.0 at index (1,)

To execute this test, run the following from the base repo dir:
 python test/test_tensor_creation_ops.py TestTensorCreationCPU.test_float_to_int_conversion_nonfinite_cpu_int32

Versions

same with #13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions