intel / intel/torch-xpu-ops

[Bug]: test_cpu_gpu_parity_nn_ConvTranspose1d_xpu_complex32 fails with Tensor-likes are not close!

Open
#4,889 2 comments 0 reactions 1 assignee Claimed by @jkosnox View on GitHub
test: ut
Dominant language
Python
Stars
113
Forks
128
Avg merge
5d 13h
Merged PRs (30d)
107

Description

### 🐛 Describe the bug

`TestModuleXPU::test_cpu_gpu_parity_nn_ConvTranspose1d_xpu_complex32` fails on XPU
with a CPU-vs-XPU numerical mismatch for `complex32` (chalf).

The CPU and XPU outputs of `nn.ConvTranspose1d` diverge beyond the parity
tolerance: 4 of 50 elements mismatch, with a greatest absolute difference of
`0.005523681640625` against an allowed `1e-05`.

### Reproduce

```bash
cd /test
pytest test_modules.py -v --timeout 600 --timeout_method=thread \
-k "test_cpu_gpu_parity_nn_ConvTranspose1d and complex32"
```

Or:

```bash
python test/test_modules.py TestModuleXPU.test_cpu_gpu_parity_nn_ConvTranspose1d_xpu_complex32
```

### Error log

```
______ TestModuleXPU.test_cpu_gpu_parity_nn_ConvTranspose1d_xpu_complex32 ______
Traceback (most recent call last):
File "test/test_modules.py", line 603, in test_cpu_gpu_parity
self.assertEqual(cpu_outputs, gpu_outputs)
File ".../torch/testing/_internal/common_utils.py", line 4809, in assertEqual
raise error_metas.pop()[0].to_error(
AssertionError: Tensor-likes are not close!

Mismatched elements: 4 / 50 (8.0%)
Greatest absolute difference: 0.005523681640625 at index (0, 0, 0) (up to 1e-05 allowed)
Greatest relative difference: 0.0013885498046875 at index (1, 0, 2) (up to 0.001 allowed)
```

### Versions

- torch: `2.14.0.dev20260726+xpu`
- pytorch commit: `47275c822fcf30fbc3d9a74b329771367d40a555`
- Device: Intel(R) Data Center GPU Max 1550 (PVC)
- Driver: `1.6.33578+57`
- XPU available: True

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.