PyTorch* Prerequisites for Intel® GPUs

ID 标签 827139
已更新 1/3/2025
版本
公共

Overview

This guide provides instructions for installing the prerequisites needed to run and build PyTorch* 2.6 on Intel® GPUs.

If you are compiling and using PyTorch 2.5, see the prerequisite instructions specific to PyTorch 2.5.

Developers who want to run PyTorch deep learning workloads need to install only the drivers and pip install PyTorch wheels binaries. The runtime package for the Intel® Deep Learning Essentials is installed automatically during the pip installation of the PyTorch wheels binaries.

Developers building PyTorch from source code need to install both the driver and Intel Deep Learning Essentials.

If you have access to an Intel GPU, use the following instructions to choose the appropriate installation method:
 

  • Intel GPU Driver: Install Intel GPU drivers along with compute and media runtimes and development packages.
  • Intel Deep Learning Essentials: Install a subset of Intel® oneAPI components needed for building and running PyTorch.
     

You can also access the Intel® Data Center GPU Max Series through Intel® Tiber™ AI Cloud:
 

  1. Register and sign in to the Intel Tiber AI Cloud.
  2. From the Learning section, select Notebook, and then select the AI with Max Series GPU filter.
  3. To open the notebook, launch PyTorch on an Intel GPU notebook.
  4. Select the latest PyTorch kernel for the notebook.

AnchorIntel GPU Driver Installation

Intel® Data Center GPUs

The operating system is verified for Intel Data Center GPUs.

GPU Red Hat* Enterprise Linux* 9.2 SUSE Linux Enterprise Server* 15 SP5 Ubuntu* Server 22.04 (>= 5.15 LTS kernel)
Intel® Data Center GPU Max Series yes yes yes


The Intel Data Center GPU Installation Instructions describe how to install software for Intel Data Center GPU Max Series systems, as well as compute and media runtimes and development packages.

These general installation instructions install the long-term support (LTS) version of the Intel GPU drivers. However, you need to use the Intel GPU driver's rolling (also referred to as rolling stable) release stream since this is where new hardware enablement first appears for early adopters who want to evaluate new features such as Profiler.

Important Follow the instructions to configure the GPU driver's installation repository to the rolling release stream (and not the LTS stream) as described in the GPU driver installation instructions.

Use the instructions in the Linux* tabs within the Data Center GPU installation instructions for installing the Intel GPU drivers, based on the Linux distribution you're using. Be sure to follow all the instructions ,including selecting the right release stream and adding your user to the render node group.

Optionally, follow these instructions to verify expected Intel GPU hardware is working.

Driver Installation for Client GPUs from Intel

Hardware Verified with Windows® 10 and 11

Hardware Verified with Ubuntu 24.10

Hardware Verified with Ubuntu 24.04 and Windows* Subsystem for Linux 2 (WSL2) with Ubuntu 24.04

Note Intel Arc B-Series graphics and Intel Core Ultra Processors series 2 with Intel Arc Graphics are not supported with Ubuntu 24.04.

Refer to the client GPU installation instructions for installing the Intel GPU drivers with specific guidance for Ubuntu 24.04. Be sure to follow all the instructions, including selecting the right release stream and adding your user to the render node group.

Optionally, follow these instructions to verify expected Intel GPU hardware is working.

 

Note Support for WSL2 is experimental. Intel Arc B-Series graphics and Intel Core Ultra processor series 2 with Intel Arc Graphics are not supported with WSL2.

When using WSL2 while running Ubuntu 24.04, the GPU drivers are installed in Windows and runtime components are installed within the WSL2 environment.
 

  1. To download and run the Windows installer to update your Windows Hardware Quality Labs (WHQL) certified graphics driver to version 31.0.101.6319 or higher, follow the instructions in the Intel® Iris® Xᵉ Graphics for Windows documentation. The document also has links to version-specific release notes about this driver.
  2. The Ubuntu 24.04 repositories do not contain compute packages for various Intel graphics products. To install these packages, use Intel's dedicated package repository.

The following driver installation instructions provide guidance for Ubuntu 24.04.
 

# Install the Intel graphics GPG public key wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg # Configure the repositories.intel.com package repository echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu noble client" | \ sudo tee /etc/apt/sources.list.d/intel-gpu-noble.list # Update the package repository meta-data sudo apt update # Install the compute-related packages sudo apt-get install -y libze1 intel-level-zero-gpu intel-opencl-icd clinfo libze-dev intel-ocloc

 

 

AnchorIntel® Deep Learning Essentials Installation

To build PyTorch, you need to install Intel Deep Learning Essentials. Choose the appropriate installation method from the following instructions.

Intel Deep Learning Essentials Installation for Intel Data Center GPUs

 

Instead of using a package manager, you can install Intel Deep Learning Essentials using offline installation scripts. Each installation script is a file containing all the needed files with a script that extracts and installs the development package.

Important Use sudo to install files in system directories so they're available globally. Without sudo, files are installed in the current user's home directory.
 

  1. Make sure the necessary tools are available:
    sudo apt update sudo apt install -y wget

     

  2. Download the Intel Deep Learning Essentials offline installation script and install:
    wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5b4aa67a-9679-4d02-865b-137d0f767d82/intel-deep-learning-essentials-2025.0.0.345_offline.sh sudo sh ./intel-deep-learning-essentials-2025.0.0.345_offline.sh -a --silent --eula accept

 


Configuration for Intel Deep Learning Essentials

Use this command to configure environment variables, important folders, and command settings.
 

source /opt/intel/oneapi/compiler/2025.0/env/vars.sh source /opt/intel/oneapi/umf/0.9/env/vars.sh source /opt/intel/oneapi/pti/0.10/env/vars.sh

Consider adding these commands to your ~/.bashrc file so they run every time you sign in or create a new shell session.

AnchorIntel Deep Learning Essentials Installation for Client GPUs from Intel

 

 

To download the Intel Deep Learning Essentials package, download the .exe file from the Registration Center. Double-click on the downloaded .exe files to run the package, and then install it using the following instructions.

Configure Intel Deep Learning Essentials Environment Variables

Use this command to configure environment variables, important folders, and command settings.
 

"C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\env\vars.bat" "C:\Program Files (x86)\Intel\oneAPI\ocloc\2024.2\env\vars.bat"

These commands must be run every time you sign in or create a new shell session.