[upstream_ut] test_tensor_storage_type_xpu: storage_type() returns None on XPU
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 112
Description
## Description
test_tensor_storage_type_xpu_* fail for all dtypes. Tensor.storage_type()
returns None on XPU instead of the expected typed storage class
(e.g. torch.FloatStorage, torch.BoolStorage, torch.ComplexDoubleStorage, ...).
## Error log
```
File "test/test_torch.py", line 302, in test_tensor_storage_type
self.assertEqual(a.storage_type(), expected_storage_type)
AssertionError: None mismatch: None is not
```
## Reproduce
```
python test/test_torch.py TestTorchDeviceTypeXPU.test_tensor_storage_type_xpu_float32
```
Contributor guide
Research direction
Run python test/test_torch.py TestTorchDeviceTypeXPU.test_tensor_storage_type_xpu_float32 and inspect test/test_torch.py around test_tensor_storage_type. Trace the XPU path used by Tensor.storage_type() for each dtype. Done means the XPU tests return the expected typed storage classes instead of None.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100