Intel® Optimized AI Frameworks
Receive community support for questions related to PyTorch* and TensorFlow* frameworks.
79 Discussions

Intel Arc and PyTorch compatibility issues on Linux

forge
Beginner
1,561 Views

Hello Intel.

 

First of all, please do tell me if there is a forum more adapted to my issue.

 

My objective is to be able to leverage my Intel Arc GPU's power for machine learning tasks and the like. I wish to be able to run tasks using PyTorch, for instance, on my GPU.

 

To do so, I have installed oneAPI following this guide (www.intel.com/(...)/oneapi/base-tookit-download.html) .
I also have installed torch 2.4.x (defaults to 2.4.1) and intel-extension-for-pytorch-2.4.x (defaults to 2.4.0). I have tried torch 2.4.0 as well with no observable difference in behavior.

 

I am trying to see if my GPU can be used by running a quick sanity check :

# Torch and intel extension imports
import torch
import intel_extension_for_pytorch as ipex

# Logger
from loguru import logger

# Check if GPU is available
if torch.xpu.is_available():
    logger.success("Intel GPU detected")
    device = torch.device("xpu:0")
else:
    logger.warning("No Intel GPU detected, using CPU")
    device = torch.device("cpu")

print("Device: ", device)

and consistently output the warning message and default to using the CPU.

 

Likewise, i consistently check the versions and the like :

print(f"{ipex.xpu.is_available()}")
print(f"torch version: {torch.__version__}")
print(f"torch ipex version: {ipex.__version__}")
print()
print(f"torch backends : {dir(torch.backends)}")
print()
print(f"torch cuda : {torch.cuda.is_available()}")

and repeatedly get the following console output :

False
torch version: 2.4.1+cu121
torch ipex version: 2.4.0+cpu

torch backends : ['ContextProp', 'PropModule', '__allow_nonbracketed_mutation', '__allow_nonbracketed_mutation_flag', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'contextmanager', 'cpu', 'cuda', 'cudnn', 'disable_global_flags', 'flags_frozen', 'mha', 'mkl', 'mkldnn', 'mps', 'nnpack', 'openmp', 'quantized', 'types']

torch cuda : False

 

My specific config is :

CPU : Intel® Core™ Ultra 7 155H

GPU : Intel® Arc™ Graphics (7d55)

OS : Linux Mint 21.3 Cinnamon (Cinnamon 6.0.4), with the 6.8 kernel

 

Running python 3.10.12 with the above packages, and have up-to-date drivers for my GPU.

 

I did my best to follow the exact desired setup for oneAPI, but am now running out of documentation on this topic, and have found little to no resembling issue.

 

Hopefully I can find help here to help me get set up and running !

 

I appreciate your time and assistance.

forge

0 Kudos
8 Replies
DeancR_Intel
Moderator
1,369 Views

Hi forge,


Thank you for posting in Intel Community!


Apologies for the delay on my response. Please share more details about the issue.

I would like to know if this is working before.

Did you make recent changes to the system?

Have you performed other troubleshooting steps?


To better understand your system's configuration, we kindly request that you download the Intel® System Support Utility for Windows* software.

 

You can find the download link here:

  1. Download and launch SSU.exe.
  2. Check the box for "Everything."
  • When the scanning is complete, click "Next."
  • Click "Save."
  • Please send the saved file to us.


Best regards,

 

Dean R.

Intel Customer Support Technician



0 Kudos
DeancR_Intel
Moderator
1,221 Views

Hi forge,


I wanted to follow up on the previous message regarding your inquiry. Have you had a chance to review it? If you have any questions or need further information, please let me know.

 

Best regards,

 

Dean R.

Intel Customer Support Technician


0 Kudos
forge
Beginner
1,171 Views

Hello Dean,

 

and sorry for the delay. As i specified before, I am trying to run this on Linux Mint, so I do not really know what i would do with the Windows executable.

Do you have specific troubleshooting steps you wish for me to perform to get the Linux configuration to work ?

 

I have a partitionned disk however. I can try running the Intel System Support Utility on my windows partition if that helps, but for professional reasons it would really be preferable if we could get my GPU to be used by code on my Linux partition.

 

Best regards,

0 Kudos
DeancR_Intel
Moderator
1,024 Views

Hi forge,


Apologies for the delay on my response. This is an acknowledgement message for your inquiry, do please wait as this will be investigated internally to be able to provide a resolution to your request. I will get back to you once I have the necessary information.

 

Best regards,

 

Dean R.

Intel Customer Support Technician


0 Kudos
DeancR_Intel
Moderator
859 Views

Hello forge,

 

Thank you for posting in the community!

 

To ensure you receive the most specialized assistance, we have a dedicated forum that addresses these specific concerns. Therefore, I will be moving this discussion to our Intel® Optimized AI Frameworks Forum. This will allow our knowledgeable community and experts to provide you with timely and accurate solutions.

 

Best regards,

 

Dean R.

Intel Customer Support Technician


0 Kudos
Zaili
Employee
849 Views

Hi forge,

 

PyTorch will be supporting Intel GPU in release 2.5 to be published in around 1 week. The "Get Start" page is https://pytorch.org/docs/main/notes/get_start_xpu.html

Please follow the guidance for driver installation and env setup steps. Thanks!

0 Kudos
forge
Beginner
768 Views

Hi Zaili, and thanks to you two !

That’s great news, i’m thrilled to see pytorch support for Intel GPUs arrive so soon !

 

One last point, to be sure :

when checking the « PyTorch prerequisites for intel GPUs » linked in the release notes, the linked Intel page does mention that Linux is not supported for Intel client GPUs.
I suppose that means I’ll have to work on my Windows partition for now …?

Is support ultimately planned to come to Linux users ?

 

Thanks a lot for the support.

 

Best regards,

0 Kudos
Zaili
Employee
708 Views

Hi forge,

 

I'm afraid the support is for Windows only for now. As the majority of AIPC users are windows-based, support for Windows is prioritized. Sorry for the inconvenience.

 

But I confirmed from internal dev team that native Linux support is on the fly, so please keep tuned.

 

Thanks,

Zaili

0 Kudos
Reply