intel / intel/torch-xpu-ops

[upstream_ut] max_pool3d_with_indices_backward_xpu lacks deterministic implementation

Open
#5,306 0 comments 0 reactions 0 assignees View on GitHub
test: ut
Dominant language
Python
Stars
113
Forks
128
Avg merge
5d 13h
Merged PRs (30d)
107

Description

## Description
`test_deterministic_max_pool3d_xpu` fails: with torch.use_deterministic_algorithms(True), the backward pass raises because max_pool3d_with_indices_backward_xpu has no deterministic implementation.

## Error log
```
File "test/test_torch.py", line 1541, in test_deterministic_max_pool3d
res.backward(torch.ones_like(res))
RuntimeError: max_pool3d_with_indices_backward_xpu does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'.
```

## Reproduce
Using pytorch/pytorch#196421 on a PVC machine:
```
python test/test_torch.py TestTorchDeviceTypeXPU.test_deterministic_max_pool3d_xpu
```

## Expected
A deterministic implementation of max_pool3d_with_indices_backward_xpu (as CUDA provides), so the test passes under deterministic mode.

_Filed with AI assistance; reproduced per the details above._

Contributor guide

Open the contributing guide

Research direction

Run `python test/test_torch.py TestTorchDeviceTypeXPU.test_deterministic_max_pool3d_xpu` on a PVC machine to reproduce the failure, then inspect `test/test_torch.py` around line 1541 and trace the `max_pool3d_with_indices_backward_xpu` entry point. Compare the expected deterministic behavior with the CUDA implementation; done means the backward pass succeeds with `torch.use_deterministic_algorithms(True)` and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.