intel / intel/torch-xpu-ops

[upstream_ut] test_broadcast map/map2: "map_ is only implemented on CPU tensors" on XPU

Open
#5,374 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
test_broadcast_fn_map_xpu and test_broadcast_fn_map2_xpu in test/test_torch.py
fail on XPU. Tensor.map_ / Tensor.map2_ are only implemented for CPU tensors.

This is a regression of the previously closed #2519 (the failure still reproduces).

## Error log
```
TypeError: map_ is only implemented on CPU tensors
TypeError: map2_ is only implemented on CPU tensors
File "test/test_torch.py", line 1233, in test_broadcast
r1 = tensorfn_inplace(large_expanded, small_expanded, small2_expanded)
```

## Reproduce
```
python test/test_torch.py TestTorchDeviceTypeXPU.test_broadcast_fn_map_xpu
python test/test_torch.py TestTorchDeviceTypeXPU.test_broadcast_fn_map2_xpu
```

Contributor guide

Open the contributing guide

Research direction

Run the two reproduction commands from the issue, then inspect test/test_torch.py around test_broadcast and the XPU handling of Tensor.map_ and Tensor.map2_. Done means both test_broadcast_fn_map_xpu and test_broadcast_fn_map2_xpu pass on XPU without the CPU-only TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.