[release/2.13] profiler\test_profiler_xpu.py::TestProfiler::test_kineto_profiler_with_environment_variable AssertionError: False is not true : Kineto is not working properly with the Dynolog environment variable
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 107
Description
### 🐛 Describe the bug
profiler\test_profiler_xpu.py::TestProfiler::test_kineto_profiler_with_environment_variable failed on Windows with Intel XPU (Arc B580).
**Error Message**
```
_________ TestProfiler.test_kineto_profiler_with_environment_variable _________
[gw0] win32 -- Python 3.12.13 C:\Users\gta\miniforge3\envs\pytorch_2.13\python.exe
Traceback (most recent call last):
File "C:\Users\gta\repositories\pytorch\pytorch\third_party\torch-xpu-ops\test\xpu\profiler\test_profiler_xpu.py", line 1771, in test_kineto_profiler_with_environment_variable
subprocess.check_output(
File "C:\Users\gta\miniforge3\envs\pytorch_2.13\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gta\miniforge3\envs\pytorch_2.13\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\gta\\miniforge3\\envs\\pytorch_2.13\\python.exe', '-W', 'always', '-c', '\nimport torch\nimport torch.nn as nn\nfrom torch.profiler import supported_activities, profile\nfrom torch.autograd.profiler import KinetoStepTracker\n\nclass SimpleNet(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.fc1 = nn.Linear(10, 5)\n self.fc2 = nn.Linear(5, 2)\n\n def forward(self, x):\n return self.fc2(self.fc1(x))\n\n\ndef payload(use_cuda=False):\n x = torch.randn(10, 10)\n if use_cuda:\n x = x.cuda()\n y = torch.randn(10, 10)\n if use_cuda:\n y = y.cuda()\n z = torch.mm(x, y)\n z = z + y\n if use_cuda:\n z = z.cpu()\n\nniters = 8\nuse_cuda = torch.profiler.ProfilerActivity.CUDA in supported_activities()\nnet = SimpleNet()\nopt = torch.optim.SGD(net.parameters(), lr=0.01)\nopt.zero_grad()\ninputs = torch.rand(10)\n\nwith profile(activities=supported_activities()):\n payload(use_cuda=use_cuda)\n\ninitial_step = KinetoStepTracker.current_step()\n\ndef run_batch():\n out = net(inputs)\n loss = torch.nn.functional.cross_entropy(out, torch.rand(2))\n loss.backward()\n opt.step()\n\nfor _ in range(niters):\n run_batch()\n\nwith profile(\n activities=supported_activities(),\n schedule=torch.profiler.schedule(\n wait=1,\n warmup=1,\n active=2),\n) as p:\n for _ in range(niters):\n run_batch()\n p.step()\nif KinetoStepTracker.current_step() != initial_step + 2 * niters:\n raise AssertionError(f"Expected step {initial_step + 2 * niters}, got {KinetoStepTracker.current_step()}")\n']' returned non-zero exit status 3221226505.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\gta\repositories\pytorch\pytorch\third_party\torch-xpu-ops\test\xpu\profiler\test_profiler_xpu.py", line 1777, in test_kineto_profiler_with_environment_variable
self.assertTrue(
File "C:\Users\gta\miniforge3\envs\pytorch_2.13\Lib\unittest\case.py", line 727, in assertTrue
raise self.failureException(msg)
AssertionError: False is not true : Kineto is not working properly with the Dynolog environment variable
```
### Versions
Click to expand environment details
```
PyTorch version: 2.13.0+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.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.8826 (20260529000000.******+***)
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.37858', 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.0.0
[pip3] intel-cmplr-lib-rt==2026.0.0
[pip3] intel-cmplr-lib-ur==2026.0.0
[pip3] intel-cmplr-lic-rt==2026.0.0
[pip3] intel-opencl-rt==2026.0.0
[pip3] intel-openmp==2026.0.0
[pip3] intel-pti==0.17.0
[pip3] intel-sycl-rt==2026.0.0
[pip3] mkl==2026.0.0
[pip3] mkl-include==2024.2.0
[pip3] mkl-static==2024.2.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.2
[pip3] onemkl-license==2026.0.0
[pip3] onemkl-sycl-blas==2026.0.0
[pip3] onemkl-sycl-dft==2026.0.0
[pip3] onemkl-sycl-lapack==2026.0.0
[pip3] onemkl-sycl-rng==2026.0.0
[pip3] onemkl-sycl-sparse==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] tbb==2023.0.0
[pip3] tbb-devel==2021.13.1
[pip3] tcmlib==1.5.0
[pip3] torch==2.13.0+xpu
[pip3] torchaudio==2.11.0+xpu
[pip3] torchmetrics==1.9.0
[pip3] torchrec-nightly==2022.4.26
[pip3] torchvision==0.28.0+xpu
[pip3] torchviz==0.0.3
[pip3] torchx-nightly==2026.6.11
[pip3] triton-xpu==3.7.2
[pip3] umf==1.1.0
[conda] dpcpp-cpp-rt 2026.0.0 pypi_0 pypi
[conda] intel-cmplr-lib-rt 2026.0.0 pypi_0 pypi
[conda] intel-cmplr-lib-ur 2026.0.0 pypi_0 pypi
[conda] intel-cmplr-lic-rt 2026.0.0 pypi_0 pypi
[conda] intel-opencl-rt 2026.0.0 pypi_0 pypi
[conda] intel-openmp 2026.0.0 pypi_0 pypi
[conda] intel-pti 0.17.0 pypi_0 pypi
[conda] intel-sycl-rt 2026.0.0 pypi_0 pypi
[conda] mkl 2026.0.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.2 pypi_0 pypi
[conda] onemkl-license 2026.0.0 pypi_0 pypi
[conda] onemkl-sycl-blas 2026.0.0 pypi_0 pypi
[conda] onemkl-sycl-dft 2026.0.0 pypi_0 pypi
[conda] onemkl-sycl-lapack 2026.0.0 pypi_0 pypi
[conda] onemkl-sycl-rng 2026.0.0 pypi_0 pypi
[conda] onemkl-sycl-sparse 2026.0.0 pypi_0 pypi
[conda] optree 0.13.0 pypi_0 pypi
[conda] tbb 2023.0.0 pypi_0 pypi
[conda] tbb-devel 2021.13.1 pypi_0 pypi
[conda] tcmlib 1.5.0 pypi_0 pypi
[conda] torch 2.13.0+xpu pypi_0 pypi
[conda] torchaudio 2.11.0+xpu pypi_0 pypi
[conda] torchmetrics 1.9.0 pypi_0 pypi
[conda] torchrec-nightly 2022.4.26 pypi_0 pypi
[conda] torchvision 0.28.0+xpu pypi_0 pypi
[conda] torchviz 0.0.3 pypi_0 pypi
[conda] torchx-nightly 2026.6.11 pypi_0 pypi
[conda] triton-xpu 3.7.2 pypi_0 pypi
[conda] umf 1.1.0 pypi_0 pypi
```
Contributor guide
Assessment
This issue has not been assessed yet.