GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
150 Discussions

Trouble installing Intel extension for PyTorch

atkat12
Beginner
299 Views

I am using the following directions in the hope of getting GPU working with PyTorch on Windows 11: https://intel.github.io/intel-extension-for-pytorch/#installation?platform=gpu&version=v2.1.20%2bxpu&os=windows&package=pip

 

When I try the sanity test,

call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat"

it returns,

 

:: WARNING: Visual Studio was not found in the standard installation location:
   "C:\Program Files\Microsoft Visual Studio\<Year>\<Edition>" or
   "C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<Edition>"
   Set the VS2019INSTALLDIR or VS2022INSTALLDIR
   environment variable to point to your install location and try again.

 

However, I do have the environment set as when I enter

echo %VS2022INSTALLDIR% 

I get

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE

If I proceed with the sanity test, the next line works, but then I fail again here:

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())];"

with the following response:

 

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\[USER]\anaconda3\envs\gpu\Lib\site-packages\torch\__init__.py", line 139, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\[USER]\anaconda3\envs\gpu\Lib\site-packages\torch\lib\backend_with_compiler.dll" or one of its dependencies.

 

Any help troubleshooting would be much appreciated! Thank you.

0 Kudos
2 Replies
Vipin_Singh1
Moderator
226 Views

Hi Katherine, could you please share the below details for further investigation: 

 

  • Is the installer an online or an offline package?  
  • Version of Microsoft Visual Studio installed along with it's build version 
  • Installation Log files.  
    • The default path for a log file for a oneAPI installation is: C:\Program Files (x86)\Intel\oneAPI\logs  
  • Is python 3 installed in your system?
  • Exact Intel® oneAPI Product name?



0 Kudos
Vipin_Singh1
Moderator
143 Views

Hi Katherine, unfortunately, we were unable to hear back from you. 


If you have any further queries, please post a new question, as this thread will no longer be monitored by Intel®. 


0 Kudos
Reply