[upstream_ut] scatter_ reduce not implemented for complex on XPU
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 112
Description
## Description
The following test/test_torch.py cases fail on XPU for complex64/complex128:
test_scatter_reduce_non_unique_index
test_scatter_reduce_operations_to_large_input
test_scatter_reduce_scalar
scatter_ with reduce= is not implemented for complex dtypes on XPU.
## Error log
```
NotImplementedError: "scatter_gather_base_kernel_func" not implemented for 'ComplexDouble'/'ComplexFloat'
NotImplementedError: "scatter_fill_base_kernel_reduce_multiply" not implemented for 'ComplexDouble'/'ComplexFloat'
File "test/test_torch.py", line 3755, in test_scatter_reduce_non_unique_index
input.scatter_(0, index, src, reduce=operation)
```
## Reproduce
```
python test/test_torch.py TestTorchDeviceTypeXPU.test_scatter_reduce_scalar_xpu_complex64
python test/test_torch.py TestTorchDeviceTypeXPU.test_scatter_reduce_non_unique_index_xpu_complex128
python test/test_torch.py TestTorchDeviceTypeXPU.test_scatter_reduce_operations_to_large_input_xpu_complex64
```
Contributor guide
Research direction
Start with the failing cases in test/test_torch.py, especially test_scatter_reduce_non_unique_index, test_scatter_reduce_operations_to_large_input, and test_scatter_reduce_scalar. Reproduce the three XPU commands, then trace the scatter_ reduce path for complex64 and complex128 from the reported kernel errors. Done means all listed complex XPU cases pass without the NotImplementedError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100