intel / intel/torch-xpu-ops

test_nn_xpu.py::TestNN::test_layer_norm_backwards_eps AssertionError: Tensor-likes are not close!

Open
#4,254 5 comments 0 reactions 1 assignee Claimed by @kdrozd-dev View on GitHub
os: Windows test: ut
Dominant language
Python
Stars
113
Forks
128
Avg merge
5d 9h
Merged PRs (30d)
112

Description

### 🐛 Describe the bug

`test_nn_xpu.py::TestNN::test_layer_norm_backwards_eps` fails on Windows with Intel XPU (Arc B580) with `AssertionError: Tensor-likes are not close!`.

torch-xpu commit hash | torch-xpu commit date | status | notes
-- | -- | -- | --
d67a8778 | Apr 23 | skipped |
bc294243 | Jun 9 | passed | release branch
390cceb8 | Jun 16 | failed |
a597fd33 | Jun 30 | failed |

### Affected Test Cases

```
test_nn_xpu.py::TestNN::test_layer_norm_backwards_eps
```

### Error Message

Click to expand traceback

```
____________________ TestNN.test_layer_norm_backwards_eps _____________________
[gw0] win32 -- Python 3.12.13 C:\Users\gta\miniforge3\envs\202607060305_viable-s_32.0.101.8860_2026.0.0.644\python.exe
Traceback (most recent call last):
File "C:\Users\gta\miniforge3\envs\202607060305_viable-s_32.0.101.8860_2026.0.0.644\Lib\unittest\case.py", line 58, in testPartExecutor
yield
File "C:\Users\gta\miniforge3\envs\202607060305_viable-s_32.0.101.8860_2026.0.0.644\Lib\unittest\case.py", line 634, in run
self._callTestMethod(testMethod)
File "C:\Users\gta\miniforge3\envs\202607060305_viable-s_32.0.101.8860_2026.0.0.644\Lib\unittest\case.py", line 589, in _callTestMethod
if method() is not None:
^^^^^^^^
File "C:\Users\gta\miniforge3\envs\202607060305_viable-s_32.0.101.8860_2026.0.0.644\Lib\site-packages\torch\testing\_internal\common_utils.py", line 3590, in wrapper
method(*args, **kwargs)
File "C:\Users\gta\repositories\pytorch\pytorch\third_party\torch-xpu-ops\test\xpu\test_nn_xpu.py", line 9697, in test_layer_norm_backwards_eps
self.assertEqual(
File "C:\Users\gta\miniforge3\envs\202607060305_viable-s_32.0.101.8860_2026.0.0.644\Lib\site-packages\torch\testing\_internal\common_utils.py", line 4608, in assertEqual
raise error_metas.pop()[0].to_error( # type: ignore[index]
AssertionError: Tensor-likes are not close!

Mismatched elements: 127759 / 131072 (97.5%)
Greatest absolute difference: 0.015340805053710938 at index (9728,) (up to 0.0001 allowed)
Greatest relative difference: 30.34475326538086 at index (59053,) (up to 1e-05 allowed)
weight grad failed: m=32 n=131072

```

### Versions

Click to expand environment details

```
PyTorch version: 2.14.0a0+git3043bfb
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Pro (10.0.26100 64-bit)
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.31.6
Libc version: N/A

Python version: 3.12.13 | packaged by conda-forge | (main, Mar 5 2026, 16:36:12) [MSC v.1944 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.26100-SP0
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: True
XPU used to build PyTorch: 20260000
Intel GPU driver version:
* 32.0.101.8860 (20260625000000.******+***)
Intel GPU models onboard:
* Intel(R) Arc(TM) B580 Graphics
Intel GPU models detected:
* [0] _XpuDeviceProperties(name='Intel(R) Arc(TM) B580 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE20B, uuid=86800be2-0000-0000-0300-000000000000, driver_version='1.15.38308', total_memory=11875MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=0MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: False
Caching allocator config: N/A

CPU:
Name: 13th Gen Intel(R) Core(TM) i9-13900
Manufacturer: GenuineIntel
Family: 207
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2000
MaxClockSpeed: 2000
L2CacheSize: 32768
L2CacheSpeed: None
Revision: None

Versions of relevant libraries:
[pip3] bert_pytorch==0.0.1a4
[pip3] functorch==1.14.0a0+b71aa0b
[pip3] intel-openmp==2026.1.0
[pip3] mkl-include==2026.0.0
[pip3] mkl-static==2026.0.0
[pip3] mypy==2.1.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.4
[pip3] onemkl-license==2026.0.0
[pip3] onnx==1.21.0
[pip3] onnx-ir==0.1.16
[pip3] onnxscript==0.6.2
[pip3] optree==0.13.0
[pip3] pytorch-labs-segment-anything-fast==0.2
[pip3] tbb==2023.0.0
[pip3] tbb-devel==2023.0.0
[pip3] tcmlib==1.5.0
[pip3] torch==2.14.0a0+git3043bfb
[pip3] torch_geometric==2.4.0
[pip3] torchao==0.17.0
[pip3] torchaudio==2.11.0a0+c0cbdb9
[pip3] torchbench==0.1
[pip3] torchmetrics==1.9.0
[pip3] torchmultimodal==0.1.0b0
[pip3] torchrec-nightly==2022.4.26
[pip3] torchvision==0.29.0a0+0bc41e6
[pip3] torchx-nightly==2026.6.29
[pip3] triton-xpu==3.7.2+git5fcc14d9
[conda] bert-pytorch 0.0.1a4 dev_0
[conda] functorch 1.14.0a0+b71aa0b pypi_0 pypi
[conda] intel-openmp 2026.1.0 pypi_0 pypi
[conda] mkl-include 2026.0.0 pypi_0 pypi
[conda] mkl-static 2026.0.0 pypi_0 pypi
[conda] numpy 1.26.4 pypi_0 pypi
[conda] onemkl-license 2026.0.0 pypi_0 pypi
[conda] optree 0.13.0 pypi_0 pypi
[conda] pytorch-labs-segment-anything-fast 0.2 pypi_0 pypi
[conda] tbb 2023.0.0 pypi_0 pypi
[conda] tbb-devel 2023.0.0 pypi_0 pypi
[conda] tcmlib 1.5.0 pypi_0 pypi
[conda] torch 2.14.0a0+git3043bfb pypi_0 pypi
[conda] torch-geometric 2.4.0 pypi_0 pypi
[conda] torchao 0.17.0 pypi_0 pypi
[conda] torchaudio 2.11.0a0+c0cbdb9 pypi_0 pypi
[conda] torchbench 0.1 pypi_0 pypi
[conda] torchmetrics 1.9.0 pypi_0 pypi
[conda] torchmultimodal 0.1.0b0 pypi_0 pypi
[conda] torchrec-nightly 2022.4.26 pypi_0 pypi
[conda] torchvision 0.29.0a0+0bc41e6 pypi_0 pypi
[conda] torchx-nightly 2026.6.29 pypi_0 pypi
[conda] triton-xpu 3.7.2+git5fcc14d9 pypi_0 pypi
```

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.