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

ipex-xpu "OSError: [WinError 126] The specified module could not be found." on windows i7-1185G7

Open KiwiHana opened this issue 11 months ago • 8 comments

Describe the bug

refer to this guide to install Ipex on windows10 i7-1185G7: https://intel.github.io/intel-extension-for-pytorch/xpu/latest/tutorials/installations/windows.html

VS 2022 oneAPI 2023.2 python 3.9 Miniconda

conda create -n ipex python=3.9
conda install pkg-config libuv
python -m pip install torch==2.0.0a0 intel_extension_for_pytorch==2.0.110+gitba7f6c1 -f https://developer.intel.com/ipex-whl-stable-xpu
> python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\hua1\Miniconda3\envs\ipex-xpu\lib\site-packages\intel_extension_for_pytorch\__init__.py", line 89, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\hua\Miniconda3\envs\ipex-xpu\lib\site-packages\intel_extension_for_pytorch\bin\intel-ext-pt-gpu.dll" or one of its dependencies.

Versions

VS 2022 oneAPI 2023.2 python 3.9 Miniconda

KiwiHana avatar Sep 12 '23 14:09 KiwiHana

Have you got the oneAPI env activated?

jingxu10 avatar Sep 13 '23 01:09 jingxu10

Have you got the oneAPI env activated? Yes, I have. The device has iGPU no Arc DGPU.

(ipex-pip) PS C:\Program Files (x86)\Intel\oneAPI> .\setvars.bat :: initializing oneAPI environment... Initializing Visual Studio command-line environment... Visual Studio version 17.3.6 environment configured. "C:\Program Files\Microsoft Visual Studio\2022\Community" Visual Studio command-line environment initialized for: 'x64' : compiler -- latest : dal -- latest : debugger -- latest : dev-utilities -- latest : dpcpp-ct -- latest : dpl -- latest : ipp -- latest : ippcp -- latest : mkl -- latest : tbb -- latest :: oneAPI environment initialized :: (ipex-pip) PS C:\Program Files (x86)\Intel\oneAPI> python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.version); print(ipex.version); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];" Traceback (most recent call last): File "", line 1, in File "C:\Users\huangya1\Miniconda3\envs\ipex-pip\lib\site-packages\intel_extension_for_pytorch_init_.py", line 89, in raise err OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\huangya1\Miniconda3\envs\ipex-pip\lib\site-packages\intel_extension_for_pytorch\bin\intel-ext-pt-gpu.dll" or one of its dependencies.

(ipex-pip) PS C:\Program Files (x86)\Intel\oneAPI> pip list Package Version


filelock 3.12.3 intel-extension-for-pytorch 2.0.110+gitba7f6c1 Jinja2 3.1.2 MarkupSafe 2.1.3 mpmath 1.3.0 networkx 3.1 numpy 1.25.2 pip 23.2.1 psutil 5.9.5 setuptools 68.0.0 sympy 1.12 torch 2.0.0a0+gitc6a572f typing_extensions 4.7.1 wheel 0.38.4

KiwiHana avatar Sep 13 '23 01:09 KiwiHana

@min-jean-cho

jingxu10 avatar Sep 13 '23 02:09 jingxu10

I have the same problem with windows,

LeonNerd avatar Oct 13 '23 08:10 LeonNerd

I have the same error but for backend_with_compiler.dll on Windows 11 with Intel Core i7 and Intel Irish Xe Graphics. I don't have CUDA or NVIDIA graphics card. I followed the same installation guide.

OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\Muhammad\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\backend_with_compiler.dll" or one of its dependencies.

midnqp avatar Oct 27 '23 07:10 midnqp

I have the same error but for backend_with_compiler.dll on Windows 11 with Intel Core i7 and Intel Irish Xe Graphics. I don't have CUDA or NVIDIA graphics card. I followed the same installation guide.

OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\Muhammad\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\backend_with_compiler.dll" or one of its dependencies.

Did you resolve your problem?

bouachalazhar avatar Jan 30 '24 13:01 bouachalazhar

@bouachalazhar You can install OneAPI 2024.0 and ipex 2.1, may work. I have tried on MTL.

KiwiHana avatar Feb 02 '24 04:02 KiwiHana

I have the same problem as @midnqp.

PS C:\Program Files (x86)\Intel\oneAPI> .\setvars.bat :: initializing oneAPI environment... Initializing Visual Studio command-line environment... Visual Studio version 17.6.2 environment configured. "C:\Program Files\Microsoft Visual Studio\2022\Community" Visual Studio command-line environment initialized for: 'x64' : advisor -- latest : compiler -- latest : dal -- latest : debugger -- latest : dev-utilities -- latest : dnnl -- latest : dpcpp-ct -- latest : dpl -- latest : ipp -- latest : ippcp -- latest : mkl -- latest : tbb -- latest : vtune -- latest :: oneAPI environment initialized :: PS C:\Program Files (x86)\Intel\oneAPI> python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.version); print(ipex.version); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];" Traceback (most recent call last): File "", line 1, in File "C:\Users\jdouc\AppData\Roaming\Python\Python310\site-packages\torch_init_.py", line 139, in raise err OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\jdouc\AppData\Roaming\Python\Python310\site-packages\torch\lib\backend_with_compiler.dll" or one of its dependencies. PS C:\Program Files (x86)\Intel\oneAPI>

Installed oneAPI 2024.0. Tried miniconda installation too, similar issues there. Something not setting up library search path correctly?

Trying intel-extension-for-pytorch 2.1.10+xpu here. Running on Win11 with an Arc A750.

doucej avatar Feb 10 '24 04:02 doucej