Skip to content

sym_sizes implementation breaks on non-dynamic ops #3816

Closed
@miladm

Description

@miladm

🐛 Bug

I get the following error when integrating dynamic shape for sym_sizes in tensor_impl class. The error occurs on 47 of the seemingly non-dynamic tests.

Sample ERROR

======================================================================
ERROR: **test_put_xla_uint8** (__main__.TestTorchDeviceTypeXLA)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 390, in instantiated_test
    raise rte
  File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
    result = test(self, **param_kwargs)
  File "../test/test_torch.py", line 3326, in test_put
    out = torch.put(dest, idx, source) #, accumulate=accumulate)
RuntimeError: bad optional access

Looks like the sym_sizes initialization is missing to handle a corner case.

Metadata

Metadata

Assignees

Labels

dynamismDynamic Shape Features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions