[release/2.14] UT inductor Windows fatal exception: access violation in unload_xpu_triton_pyds
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 112
Description
### 🐛 Describe the bug
Issue found during pre RC test with torch 2.14.0.dev+xpu on Windows with Intel XPU.
339 UTs across 5 `pytorch\test\inductor\*` test files crash on Windows with Intel XPU with a native **access violation** (exit code `3221225477` / `0xC0000005`). The crash does not happen inside the test body but during test teardown, in `torch/_inductor/utils.py::unload_xpu_triton_pyds` called from `fresh_cache`. Because the worker process dies, every affected test is reported as `FAILED CONSISTENTLY`.
### Affected Test Cases
339 tests fail with this crash, broken down by file:
```
test/inductor/test_codecache.py 164
test/inductor/test_compiled_optimizers.py 85
test/inductor/test_triton_kernels.py 52
test/inductor/test_compiled_autograd.py 22
test/inductor/test_torchinductor.py 16
```
Representative cases:
```
test/inductor/test_codecache.py::TestCacheKeyStrategy::test_autotune_prepare_key_uses_strategy - Windows fatal exception: access violation (exit code 3221225477)
test/inductor/test_codecache.py::TestFxGraphCache::test_cache_hot_load_generic - Windows fatal exception: access violation (exit code 3221225477)
test/inductor/test_compiled_optimizers.py::CompiledOptimizerTests::test_adam_cpu - Windows fatal exception: access violation (exit code 3221225477)
test/inductor/test_triton_kernels.py::MutationTests::test_mutations_add_kernel - Windows fatal exception: access violation (exit code 3221225477)
test/inductor/test_torchinductor.py::GPUTests::test_bincount_xpu - Windows fatal exception: access violation (exit code 3221225477)
```
### Error Message
click to expand
```
inductor\test_codecache.py::TestCacheKeyStrategy::test_autotune_prepare_key_uses_strategy Windows fatal exception: access violation
Current thread 0x00000798 (most recent call first):
Garbage-collecting
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\site-packages\torch\_inductor\utils.py", line 1423 in unload_xpu_triton_pyds
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\site-packages\torch\_inductor\utils.py", line 1509 in fresh_cache
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\contextlib.py", line 144 in __exit__
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\contextlib.py", line 595 in __exit__
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\contextlib.py", line 618 in close
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\site-packages\torch\_inductor\test_case.py", line 50 in tearDown
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\unittest\case.py", line 594 in _callTearDown
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\unittest\case.py", line 637 in run
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\site-packages\torch\testing\_internal\common_utils.py", line 3953 in _run_custom
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\site-packages\torch\testing\_internal\common_utils.py", line 3986 in run
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\unittest\case.py", line 690 in __call__
File "C:\Users\gta\miniforge3\envs\pytorch_2.14_pre-release\Lib\site-packages\_pytest\unittest.py", line 333 in runtest
...
File "C:\Users\gta\repositories\pytorch\pytorch\test\inductor\test_codecache.py", line 5718 in
Got exit code 3221225477
```
### Versions
Click to expand traceback
PyTorch version: 2.14.0.dev20260805+xpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: Microsoft Windows 11 Pro (10.0.26200 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.26200-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: 20260100
Intel GPU driver version:
* 32.0.101.8864 (20260717000000.******+***)
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) i5-13400
Manufacturer: GenuineIntel
Family: 205
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2500
MaxClockSpeed: 2500
L2CacheSize: 9728
L2CacheSpeed: None
Revision: None
Versions of relevant libraries:
[pip3] dpcpp-cpp-rt==2026.1.0
[pip3] intel-cmplr-lib-rt==2026.1.0
[pip3] intel-cmplr-lib-ur==2026.1.0
[pip3] intel-cmplr-lic-rt==2026.1.0
[pip3] intel-opencl-rt==2026.1.0
[pip3] intel-openmp==2026.1.0
[pip3] intel-pti==1.0.1
[pip3] intel-sycl-rt==2026.1.0
[pip3] mkl==2026.1.0
[pip3] mkl-include==2024.2.0
[pip3] mkl-static==2024.2.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.4
[pip3] onemkl-license==2026.1.0
[pip3] onemkl-sycl-blas==2026.1.0
[pip3] onemkl-sycl-dft==2026.1.0
[pip3] onemkl-sycl-lapack==2026.1.0
[pip3] onemkl-sycl-rng==2026.1.0
[pip3] onemkl-sycl-sparse==2026.1.0
[pip3] onnx==1.21.0
[pip3] onnx-ir==0.1.16
[pip3] onnxscript==0.6.2
[pip3] optree==0.13.0
[pip3] tbb==2023.1.0
[pip3] tbb-devel==2021.13.1
[pip3] tcmlib==1.5.0
[pip3] torch==2.14.0.dev20260805+xpu
[pip3] torchaudio==2.11.0.dev20260805+xpu
[pip3] torchvision==0.29.0.dev20260805+xpu
[pip3] triton-xpu==3.8.0+git1e2d42a0
[pip3] umf==1.1.0
[conda] dpcpp-cpp-rt 2026.1.0 pypi_0 pypi
[conda] intel-cmplr-lib-rt 2026.1.0 pypi_0 pypi
[conda] intel-cmplr-lib-ur 2026.1.0 pypi_0 pypi
[conda] intel-cmplr-lic-rt 2026.1.0 pypi_0 pypi
[conda] intel-opencl-rt 2026.1.0 pypi_0 pypi
[conda] intel-openmp 2026.1.0 pypi_0 pypi
[conda] intel-pti 1.0.1 pypi_0 pypi
[conda] intel-sycl-rt 2026.1.0 pypi_0 pypi
[conda] mkl 2026.1.0 pypi_0 pypi
[conda] mkl-include 2024.2.0 pypi_0 pypi
[conda] mkl-static 2024.2.0 pypi_0 pypi
[conda] numpy 1.26.4 pypi_0 pypi
[conda] onemkl-license 2026.1.0 pypi_0 pypi
[conda] onemkl-sycl-blas 2026.1.0 pypi_0 pypi
[conda] onemkl-sycl-dft 2026.1.0 pypi_0 pypi
[conda] onemkl-sycl-lapack 2026.1.0 pypi_0 pypi
[conda] onemkl-sycl-rng 2026.1.0 pypi_0 pypi
[conda] onemkl-sycl-sparse 2026.1.0 pypi_0 pypi
[conda] optree 0.13.0 pypi_0 pypi
[conda] tbb 2023.1.0 pypi_0 pypi
[conda] tbb-devel 2021.13.1 pypi_0 pypi
[conda] tcmlib 1.5.0 pypi_0 pypi
[conda] torch 2.14.0.dev20260805+xpu pypi_0 pypi
[conda] torchaudio 2.11.0.dev20260805+xpu pypi_0 pypi
[conda] torchvision 0.29.0.dev20260805+xpu pypi_0 pypi
[conda] triton-xpu 3.8.0+git1e2d42a0 pypi_0 pypi
[conda] umf 1.1.0 pypi_0 pypi
Contributor guide
Assessment
This issue has not been assessed yet.