intel-extension-for-pytorch: xpu not supported?

Hi, I have ADL GT1 GPU and would like to use ipex. I have installed the following versions of software:

intel-opencl-icd 22.23.23405+i755~u20.04
intel-level-zero-gpu 1.3.23405+i755~u20.04
intel-oneapi-runtime-dpcpp-cpp-common 2022.1.0-376
intel-extension-for-pytorch 1.11.08
torch 1.11.0

clinfo sees the card:

Platform Name                                   Intel(R) OpenCL HD Graphics

But when I run the following code:

import torch
import intel_extension_for_pytorch as ipex

f = torch.zeros((1,2,3)).to("xpu")

I get RuntimeError: PyTorch is not linked with support for xpu devices

Am I missing a requirement or is xpu not yet supported? I want to use ipex with Arc A380, but if it isn’t supported yet…

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

Yes, that’s the issue. The prebuilt wheel files are for Python 3.6 to Python 3.9.

Instructions in the README for gpu seem to be incorrect. There is no pytorch version 1.10.0a0 available:

python -m pip install torch==1.10.0a0 -f https://developer.intel.com/ipex-whl-stable-xpu
Looking in links: https://developer.intel.com/ipex-whl-stable-xpu
ERROR: Could not find a version that satisfies the requirement torch==1.10.0a0 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0)
ERROR: No matching distribution found for torch==1.10.0a0

I don’t see the whl files in https://www.intel.com/content/dam/develop/external/us/en/documents/ipex/whl-stable-xpu.html either.

@tripzero Oh yea I ran into the same issue earlier when trying to get IPEX up and running on my machine; I simply changed the pytorch version to 1.10.0a0+git3d5f2d4 and then it worked fine 😄 You’re right though that the documentation should be corrected to account for this discrepancy between what is documented and what actually exists in the repositories.

Yes, intel_extension_for_pytorch supports XMX via oneDNN.

You can use the docker file from here: https://github.com/intel/intel-extension-for-pytorch/commit/e67ce74a5b4a8c428c0bf4a4ebe0737c7f68b086 It’s in xpu-master branch and was updated to use XPU

@tedliosu About when you posted this, release v1.10.200 was released with XPU support based on xpu-master branch.

Unfortunately as you can tell by the version, it’s based on a fairly old Torch (1.10) whereas 1.13 was just released. The new Intel Tensorflow extension supports the latest Tensorflow.

Am I missing a requirement or is xpu not yet supported? I want to use ipex with Arc A380, but if it isn’t supported yet…

XPU is not supported yet. It is something to add in the near future. Please stay tuned.

Any update on this may I ask @jgong5? The tensorflow counterpart has just been released and is tested working on my machine (at least) (https://blog.tensorflow.org/2022/10/accelerating-tensorflow-on-intel-data-center-gpu-flex-series.html), so I was just wondering how much progess has been made for pytorch 👍