PyTorch* Prerequisites for Intel® GPUs

ID 827139
Updated 9/23/2025
Version
Public

author-image

By

Overview

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

If you are compiling and using PyTorch 2.8, please refer to the prerequisite instructions specific to PyTorch 2.8.

Most users who only want to run PyTorch deep learning workloads need to follow the Driver Installation and use pip to install the PyTorch wheel binaries.

The runtime packages for Intel® Deep Learning Essentials will be installed automatically during the pip installation of PyTorch wheels. Therefore, please skip the Intel® Deep Learning Essentials installation in this article.

Only developers who want to build PyTorch from source code need to install both the Intel driver and Intel® Deep Learning essentials.

If you have access to an Intel GPU, follow the instructions below to choose the appropriate method to install.

  • Intel GPU Driver Installation (intel-gpu-driver-installation): Install Intel GPU drivers along with compute and media runtimes and development packages.
  • Intel® Deep Learning essentials Installation(intel-deeplearning-essentials-installation): Install a subset of Intel® oneAPI components needed for building and running PyTorch.

Intel GPU Driver Installation

Driver Installation for Intel Data Center GPUs

OS Verified for Intel Data Center GPUs.

The Data Center GPU Installation Instructions describe software installation for Intel® Data Center GPU Max Series systems, along with 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'll 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 OS-specific 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 Intel Client GPUs

We recommend installing and using the latest drivers to ensure optimal performance and compatibility for your hardware.

Refer to the Client GPU installation instructions for latest Ubuntu for installing the Intel GPU drivers with specific guidance for Ubuntu 25.04 & Ubuntu 24.04. Be sure to follow all the instructions, including extra hardware enablement on Ubuntu 24.04 and adding your user to the render node group for permission.

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

Follow the instructions in the Intel® & Iris® Xe Graphics - Windows documentation to download and run the installer to update your WHQL Certified graphics driver to version 32.0.101.7028 or higher. Please include LevelZeroSDK in the installation package for `torch.compile` usage on Windows and Kineto Enabling when building from source.

AnchorIntel® Deep Learning Essentials Installation

If you need to build PyTorch, you will need to install Intel® Deep Learning Essentials. Follow the instructions below to choose the appropriate method to install.

Intel® Deep Learning Essentials Installation for Intel Data Center GPUs

For RPM-based distributions such as Red Hat Enterprise Linux Server, YUM is the usual choice. You’ll need to configure YUM to install software packages that aren’t available in the default repositories. These instructions show how to add access to the appropriate Intel repository, along with the public key used to authenticate the downloaded packages.

  1. Create an Intel YUM repository information file and move it to the YUM configuration directory:
    
    tee > /tmp/oneAPI.repo << EOF
    
    [oneAPI]
    
    name=Intel® oneAPI repository
    
    baseurl=https://yum.repos.intel.com/oneapi
    
    enabled=1
    
    gpgcheck=1
    
    repo_gpgcheck=1
    
    gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
    
    EOF
    
    sudo mv /tmp/oneAPI.repo /etc/yum.repos.d
    

     

  2. Use YUM to install Intel® Deep Learning Essentials:
    
    sudo yum install intel-deep-learning-essentials-2025.2

     

For Debian-based Linux distributions such as Ubuntu Server, APT is the usual choice. You’ll need to configure APT to install software packages that aren’t available in the default repositories. These instructions show how to add access to the appropriate Intel repository, along with the public key used to authenticate the downloaded packages.

  1. Make sure the necessary tools to add repository access are available:
    
    sudo apt update
    
    sudo apt install -y gpg-agent wget gnupg
    

     

  2. Download the Intel APT repository’s public key and put it into the /usr/share/keyrings directory:
    
    # download the key to system keyring
    
    wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
    
    # add signed entry to apt sources and configure the APT client to use Intel repository:
    
    echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
    

     

  3. Update the APT package list and repository index:
    
    sudo apt update
    

     

  4. Use APT to install Intel® Deep Learning Essentials:
    
    sudo apt install intel-deep-learning-essentials-2025.2

     

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 together 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/de3686c4-d3e1-41da-bf3b-bf5908da075c/intel-deep-learning-essentials-2025.2.1.24_offline.sh
    
    sudo sh ./intel-deep-learning-essentials-2025.2.1.24_offline.sh -a --silent --eula accept
    

Set Up Intel DeepLearning Environment Variables

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


source /opt/intel/oneapi/compiler/latest/env/vars.sh

source /opt/intel/oneapi/umf/latest/env/vars.sh

source /opt/intel/oneapi/pti/latest/env/vars.sh

source /opt/intel/oneapi/ccl/latest/env/vars.sh

source /opt/intel/oneapi/mpi/latest/env/vars.sh

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

Intel Deep Learning Essentials Installation for Intel Client GPUs

 

  1. Make sure the necessary tools to add repository access are available:
    
    sudo apt update
    sudo apt install -y gpg-agent wget gnupg
    

     

  2. Download the Intel APT repository’s public key and put it into the /usr/share/keyrings directory:
    
    # download the key to system keyring
    
    wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
    
    # add signed entry to apt sources and configure the APT client to use Intel repository:
    
    echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] 
    https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list

     

  3. Update the APT package list and repository index:
    
    sudo apt update
    

     

  4. Use APT to install Intel® Deep Learning Essentials:
    
    sudo apt install intel-deep-learning-essentials-2025.2

Set Up Intel DeepLearning Environment Variables

Note If you installed PyTorch from Binaries, you already have the required packages in Intel Deep Learning Essentials. Do not configure the following variable to avoid conflicts.

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


source /opt/intel/oneapi/compiler/latest/env/vars.sh

source /opt/intel/oneapi/pti/latest/env/vars.sh

source /opt/intel/oneapi/umf/latest/env/vars.sh

source /opt/intel/oneapi/ccl/latest/env/vars.sh

source /opt/intel/oneapi/mpi/latest/env/vars.sh

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

Note If you build PyTorch from source on Windows, here is required steps to enable Kineto before compiling.


set "INCLUDE=%LEVEL_ZERO_V1_SDK_PATH%\include;%INCLUDE%"

set XPU_ENABLE_KINETO=1

To use the Kineto feature, your driver version must be 32.0.101.6732 or higher. Follow the instructions in the Intel® & Iris® Xe Graphics - Windows documentation to download and run the installer to update your WHQL Certified graphics driver to version 32.0.101.6732 or higher. Please include LevelZeroSDK in the installation package.

Click on the following to download Intel® Deep Learning Essentials package. Then double-click on the downloaded exe files to run it and follow the instructions to install: intel-deep-learning-essentials-2025.2.1.25_offline.exe.

Set Up Intel DeepLearning Environment Variables

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


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

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

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

Where to go next?

After installing Intel GPU drivers and the two support packages, as shown above, you're ready to return to and continue following the upstream PyTorch instructions in the PyTorch Building from Source: Install Dependencies section.

1