Skip to content

[BMG-Windows][PT2.8]Torch-xpu-ops UT got accuracy issue #1818

@libohao1201

Description

@libohao1201

🐛 Describe the bug

The following torch-xpu-ops uts got AssertionError: Scalars are not close! or AssertionError: Tensor-likes are not close!.

# AssertionError: Scalars are not close!
test_nn_xpu.py::TestNNDeviceTypeXPU::test_GroupNorm_general_xpu
test_reductions_xpu.py::TestReductionsXPU::test_noncontiguous_expanded__refs_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_noncontiguous_expanded_masked_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_noncontiguous_transposed__refs_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_noncontiguous_transposed_masked_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_ref_duplicate_values__refs_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_ref_duplicate_values_masked_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_ref_small_input__refs_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_ref_small_input_masked_prod_xpu_complex128
test_reductions_xpu.py::TestReductionsXPU::test_reference_masked_masked_prod_xpu_complex128



# AssertionError: Tensor-likes are not close!
FAILED test_reductions_xpu.py::TestReductionsXPU::test_ref_duplicate_values_prod_xpu_complex128

Reproducer:

conda create -n pt28_rc1 python=3.10 -y
conda activate pt28_rc1
pip install --pre torch==2.8.0 --index-url https://download.pytorch.org/whl/test/xpu 

git clone https://github.com/pytorch/pytorch.git
cd pytorch
git checkout 03eb1e40f9ddf09cb9eef86ace74332e87f11a79

cd third_party
git clone https://github.com/intel/torch-xpu-ops.git
cd torch-xpu-ops
git checkout 3a9419c8bb6a98dd3e3cd473c36691fb4abeae40

pip install -r requirements.txt
pip install -r .ci\docker\requirements-ci.txt
pip install pytest-timeout   

# MSVC activate
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"  

cd C:\pytorch\third_party\torch-xpu-ops\test\xpu
set PYTORCH_TEST_WITH_SLOW=1
set PYTORCH_ENABLE_XPU_FALLBACK=1


pytest -v test_nn_xpu.py::TestNNDeviceTypeXPU::test_GroupNorm_general_xpu

Versions

Machine BMG - Win11
stock pytorch PyTorch: pip install --pre torch==2.8.0 --index-url https://download.pytorch.org/whl/test/xpu commit: 03eb1e40f9ddf09cb9eef86ace74332e87f11a79
triton pytorch-triton-xpu 3.4.0
torch-xpu-ops 3a9419c
Driver internal driver: 32.0.101.6881
Conda python 3.10
transformer 243e186efbf7fb93328dd6b34927a4e8c8f24395
Others torchao 0.11.0 torchaudio 2.8.0a0+4e94321 torchvision 0.22.0a0+966da7e

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions