open-ce / pytorch-feedstock

Apache License 2.0
5 stars 11 forks source link

test_numba_integration test failures #49

Closed cdeepali closed 3 years ago

cdeepali commented 3 years ago

Seeing numba_integration test failures with latest numba version i.e v0.53.0:

$ python test/run_test.py -i test_numba_integration
Running test_numba_integration ... [2021-03-25 06:07:44.823240]
Executing ['/opt/conda/envs/py180-25March/bin/python', 'test_numba_integration.py'] ... [2021-03-25 06:07:44.823282]
....FF.F
======================================================================
FAIL: test_from_cuda_array_interface (__main__.TestNumbaIntegration)
torch.as_tensor() and torch.tensor() supports the __cuda_array_interface__ protocol.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_numba_integration.py", line 266, in test_from_cuda_array_interface
    self.assertEqual(numba_ary.__cuda_array_interface__, torch_ary.__cuda_array_interface__)
  File "/opt/conda/envs/py180-25March/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1182, in assertEqual
    exact_device=exact_device)
  File "/opt/conda/envs/py180-25March/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1173, in assertEqual
    super().assertEqual(x, y, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
AssertionError: Items in the first set but not the second:
'stream' : Attempted to compare [set] types: Expected: {'data', 'typestr', 'strides', 'stream', 'shape', 'version'}; Actual: {'data', 'typestr', 'strides', 'shape', 'version'}.

======================================================================
FAIL: test_from_cuda_array_interface_active_device (__main__.TestNumbaIntegration)
torch.as_tensor() tensor device must match active numba context.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_numba_integration.py", line 339, in test_from_cuda_array_interface_active_device
    self.assertEqual(torch_ary.__cuda_array_interface__, numba_ary.__cuda_array_interface__)
  File "/opt/conda/envs/py180-25March/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1182, in assertEqual
    exact_device=exact_device)
  File "/opt/conda/envs/py180-25March/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1173, in assertEqual
    super().assertEqual(x, y, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
AssertionError: Items in the second set but not the first:
'stream' : Attempted to compare [set] types: Expected: {'data', 'typestr', 'strides', 'shape', 'version'}; Actual: {'data', 'typestr', 'strides', 'stream', 'shape', 'version'}.

======================================================================
FAIL: test_from_cuda_array_interface_lifetime (__main__.TestNumbaIntegration)
torch.as_tensor(obj) tensor grabs a reference to obj so that the lifetime of obj exceeds the tensor
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_numba_integration.py", line 324, in test_from_cuda_array_interface_lifetime
    self.assertEqual(torch_ary.__cuda_array_interface__, numba_ary.__cuda_array_interface__)  # No copy
  File "/opt/conda/envs/py180-25March/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1182, in assertEqual
    exact_device=exact_device)
  File "/opt/conda/envs/py180-25March/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1173, in assertEqual
    super().assertEqual(x, y, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
AssertionError: Items in the second set but not the first:
'stream' : Attempted to compare [set] types: Expected: {'data', 'typestr', 'strides', 'shape', 'version'}; Actual: {'data', 'typestr', 'strides', 'stream', 'shape', 'version'}.

----------------------------------------------------------------------
Ran 8 tests in 2.183s