[B60][stock PyTorch][XPU] Tensor closeness mismatches in Inductor dynamic/select tests
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 112
Description
## Summary
B60 has stock PyTorch XPU numerical mismatches reported as tensor closeness failures. The same tests passed on PVC.
## Failure Category
Tensor closeness mismatch.
Representative messages:
```text
AssertionError: Tensor-likes are not close
Tensor-likes are not close
```
## Scope
- Test suite: stock PyTorch
- Platform comparison: B60 failed; PVC passed
- Affected rows observed: 2
## Failures
```text
test/inductor/test_torchinductor_dynamic_shapes.py::TestInductorDynamicXPU::test_coalescing_analysis_sympy_is_constant_xpu
AssertionError: Tensor-likes are not close
test/inductor/test_select_algorithm.py::TestExternKernelCaller::test_extern_kernel_benchmark_valid_timing
Tensor-likes are not close
```
## Expected Behavior
The compiled XPU output should match eager/reference output within test tolerance, consistent with PVC behavior.
## Notes
The two failures are in different Inductor areas. They are grouped here because the visible failure mode is the same; they can be split if triage identifies separate root causes.
## Full Case List
Total cases: 2
1. `stock pytorch` | `test/inductor/test_torchinductor_dynamic_shapes.py::TestInductorDynamicXPU::test_coalescing_analysis_sympy_is_constant_xpu` | `failed`
- `AssertionError: Tensor-likes are not close`
2. `stock pytorch` | `test/inductor/test_select_algorithm.py::TestExternKernelCaller::test_extern_kernel_benchmark_valid_timing` | `failed`
- `Tensor-likes are not close`
## Reproducer / Environment Setup
```bash
docker run -it -e TZ=Asia/Shanghai --device=/dev/mem --device=/dev/dri --group-add video --privileged -v $(realpath ${HOME}):/home/jenkins --shm-size=8g intelgpu/ubuntu-26.04-rolling:26.18 bash
apt update
apt upgrade -y
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv venv myvenv --python 3.10 --clear
source myvenv/bin/activate
uv pip install pip wheel "setuptools<81"
uv pip install torch==2.13.0 torchaudio torchvision --index-url https://download.pytorch.org/whl/xpu
pytorch_commit="$(python -c 'import torch; print(torch.version.git_version)')"
git clone https://github.com/pytorch/pytorch
cd pytorch
git checkout ${pytorch_commit}
uv pip install -r .ci/docker/requirements-ci.txt
uv pip install -U typing_extensions
uv pip install pytest pytest-timeout pytest-xdist pytest-rerunfailures
python test/inductor/test_torchinductor_dynamic_shapes.py -k 'test_coalescing_analysis_sympy_is_constant_xpu'
python test/inductor/test_select_algorithm.py -k 'test_extern_kernel_benchmark_valid_timing'
```
Contributor guide
Research direction
Reproduce the two cases with the provided environment and commands: test/inductor/test_torchinductor_dynamic_shapes.py::TestInductorDynamicXPU::test_coalescing_analysis_sympy_is_constant_xpu and test/inductor/test_select_algorithm.py::TestExternKernelCaller::test_extern_kernel_benchmark_valid_timing. Compare compiled XPU output with eager/reference output and investigate the tensor closeness failures separately; done means both tests pass within tolerance on B60.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers, machine-learning, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100