array-api-compat icon indicating copy to clipboard operation
array-api-compat copied to clipboard

PyTorch test failures

Open asmeurer opened this issue 1 year ago • 0 comments

A bunch of array-api-tests are failing with the latest version of PyTorch with RuntimeError: Promotion for uint16, uint32, uint64 types is not supported, attempted to promote Int and UInt16.

It seems PyTorch added support for uint16, but the support is limited:

>>> torch.equal(torch.tensor(0, dtype=torch.int32), torch.tensor(0, dtype=torch.uint16))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: Promotion for uint16, uint32, uint64 types is not supported, attempted to promote Int and UInt16

See https://pytorch.org/docs/stable/tensors.html#id12

It would be useful if we could skip this dtype entirely in the test suite somehow. Otherwise we will basically need to xfail every two-argument function test.

asmeurer avatar May 17 '24 18:05 asmeurer