intel-extension-for-pytorch icon indicating copy to clipboard operation
intel-extension-for-pytorch copied to clipboard

OSError: [WinError 127] loading intel-ext-pt-gpu.dll on Core Ultra 5 125H (Meteor Lake)

Open CleopatraGreuel opened this issue 6 months ago • 1 comments

Describe the bug

  1. 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

  1. 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.

  2. 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.

  1. 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.

CleopatraGreuel avatar Jun 26 '25 06:06 CleopatraGreuel

@CleopatraGreuel It is recommended using latest PyTorch 2.8 for Meteor Lake support. Please refer to https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpu/2-8.html.

Note that we have deprioritized active development of Intel® Extension for PyTorch* on GPU platforms after 2.8 release. Going forward, our strategy is to focus on developing new features and supporting upcoming platform launches directly within PyTorch*.

tye1 avatar Sep 08 '25 07:09 tye1