intel / intel/torch-xpu-ops

[upstream_ut] scatter_ reduce not implemented for complex on XPU

Open
#5,376 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.