Traceback (most recent call last):
File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_subclasses/fake_utils.py", line 182, in __torch_dispatch
torch._prims.utils.compare_tensor_meta(
File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_prims_common/init__.py", line 156, in compare_tensor_meta
raise AssertionError(msg)
AssertionError: Shapes torch.Size([0]) and torch.Size([5]) are not equal!
Traceback (most recent call last):
File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_subclasses/fake_utils.py", line 182, in __torch_dispatch
torch._prims.utils.compare_tensor_meta(
File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_prims_common/init__.py", line 156, in compare_tensor_meta
raise AssertionError(msg)
AssertionError: Shapes torch.Size([0]) and torch.Size([5]) are not equal!
To reproduce, change test/test_ops.py instantiate_device_type_tests(TestFakeTensor, globals()) ==> instantiate_device_type_tests(TestFakeTensor, globals(), allow_xpu=True) and run
š Describe the bug
Run TestFakeTensor with xpu we got a lot of errors of shapes are not equal. For example:
====================================================================== ERROR: test_fake_crossref_backward_amp_nn_functional_multilabel_soft_margin_loss_xpu_float32 (main.TestFakeTensorXPU)
Traceback (most recent call last): File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_subclasses/fake_utils.py", line 182, in __torch_dispatch torch._prims.utils.compare_tensor_meta( File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_prims_common/init__.py", line 156, in compare_tensor_meta raise AssertionError(msg) AssertionError: Shapes torch.Size([0]) and torch.Size([5]) are not equal!
Another issue is in backward:
ERROR: test_fake_crossref_backward_amp_nn_functional_multilabel_soft_margin_loss_xpu_float32 (main.TestFakeTensorXPU)
Traceback (most recent call last): File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_subclasses/fake_utils.py", line 182, in __torch_dispatch torch._prims.utils.compare_tensor_meta( File "/home/gta/miniforge3/envs/daisy_upstream/lib/python3.10/site-packages/torch/_prims_common/init__.py", line 156, in compare_tensor_meta raise AssertionError(msg) AssertionError: Shapes torch.Size([0]) and torch.Size([5]) are not equal!
To reproduce, change test/test_ops.py instantiate_device_type_tests(TestFakeTensor, globals()) ==> instantiate_device_type_tests(TestFakeTensor, globals(), allow_xpu=True) and run
Versions
latest version