-
Notifications
You must be signed in to change notification settings - Fork 289
Description
Describe the bug
- System Information:
CPU: Intel(R) Core(TM) Ultra 5 125H
GPU: Intel(R) Arc(TM) Graphics (integrated)
PyTorch Version: 2.7.0 (installed from https://download.pytorch.org/whl/xpu)
IPEX Version: 2.7.10+xpu
OS: Windows
-
Problem Description:
I am consistently encountering OSError: [WinError 127] The specified procedure could not be found. when trying to import intel_extension_for_pytorch. This happens when the library attempts to load intel-ext-pt-gpu.dll. -
sycl-ls command output (proves oneAPI and drivers are working):
[level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Arc(TM) Graphics 12.71.4 [1.6.32413]
[opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Core(TM) Ultra 5 125H OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) Graphics OpenCL 3.0 NEO [32.0.101.6647]
[opencl:cpu][opencl:2] Intel(R) OpenCL, Intel(R) Core(TM) Ultra 5 125H OpenCL 3.0 (Build 0) [2024.18.11.0.13_160000]
4. Debugging Steps Taken:
We have tried extensive debugging to resolve this, including:
Clean installation in a new Python venv.
Installation of the latest VC++ Redistributable.
Installation of the latest Intel Graphics Driver.
Installation of the full oneAPI Base Toolkit.
Manually overriding the PATH environment variable in PyCharm's Run Configuration with the output of setvars.bat.
Directly calling os.add_dll_directory() in the Python script to point to the torch\lib folder before import.
None of these steps resolved the issue. The error persists.
- Test Script and Final Error:
This is the script used for the final test:
Python
import os
import sys
torch_lib_path = r"D:\bin\py\WhisperSubtitles.venv\Lib\site-packages\torch\lib"
print(f"--- Manually adding DLL directory to Python's search path ---")
print(f"Target Path: {torch_lib_path}")
try:
os.add_dll_directory(torch_lib_path)
print("Successfully added to DLL search path.")
except Exception as e:
print(f"ERROR: Failed to add DLL directory. Error: {e}")
sys.exit(1)
print("\n--- DLL path configured. Now attempting to import IPEX... ---")
try:
import torch
import intel_extension_for_pytorch as ipex
print("SUCCESS: IPEX imported successfully.")
except Exception as e:
print(f"FAILURE: An error occurred during import: {e}")
This script produces the following output:
--- Manually adding DLL directory to Python's search path ---
Target Path: D:\bin\py\WhisperSubtitles.venv\Lib\site-packages\torch\lib
Successfully added to DLL search path.
--- DLL path configured. Now attempting to import IPEX... ---
FAILURE: An error occurred during import: [WinError 127] Error loading "D:\bin\py\WhisperSubtitles.venv\Lib\site-packages\intel_extension_for_pytorch\bin\intel-ext-pt-gpu.dll" or one of its dependencies.
This indicates a probable binary incompatibility between the IPEX library version and the underlying drivers/oneAPI libraries on the new Meteor Lake platform.
Versions
StatusCode : 200
StatusDescription : OK
Content : # Referenced from https://github.com/pytorch/pytorch/blob/master/torch/utils/collect_env.py
# Run it with python collect_env.py
.
import json
import locale
import re
import subprocess
import sys
impo...
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
...
Forms : {}
Headers : {[Connection, keep-alive], [Content-Security-Policy, default-src 'none'; style-src 'unsafe-inline'; sandbox], [Strict-Transport-Security, max-age=31536000], [X-Con
tent-Type-Options, nosniff]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 18085
(base) (.venv) PS D:\bin\py\WhisperSubtitles> # For security purposes, please check the output contents of collect_env.py before posting them.