I am getting the following error. I am using oneapi.
(pytorch) u178728@s001-n157:~$ python
Python 3.9.13 (main, Oct 19 2022, 17:23:07)
[GCC 11.2.0] :: Intel Corporation on linux
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
Please check out: https://software.intel.com/en-us/python-distribution
>>> import torch
>>> import intel_extension_for_pytorch
>>> torch.xpu.is_available()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'torch' has no attribute 'xpu'
Please help.
連結已複製
Hi,
We have seen no response from user in last 7 days. We'll close the case by 13 Dec if no further response comes.
Or if you are happy with the answer please mark it as the solution.
To add more on Jing's answer
On DevCloud, oneAPI AI Analytics Toolkit have environment for IPEX CPU build not for IPEX GPU. For Intel GPU, we need to install it manually after installing the GPU drivers. Can check the IPEX GPU installation guide: https://intel.github.io/intel-extension-for-pytorch/xpu/latest/
Regarding the attribute error, Are you referring to checking IPEX GPU installation using this command torch.xpu.is_available() like torch.cuda.is_available()?
If yes. this command only works in IPEX GPU installation. It's not yet available for IPEX CPU and other PyTorch installations.
