Experimental: Intel® Arc™ A-Series GPU Software Installation

Experimental Release

The Intel® Extension for TensorFlow* has early experimental only support for Intel® Arc™ A-Series GPUs on Windows Subsystem for Linux 2 with Ubuntu Linux installed and native Ubuntu Linux.

Issues opened for the Intel® Extension for TensorFlow* on Intel® Arc™ A-Series GPUs will be addressed on a best-effort basis, but no guarantee is provided as to when these issues will be fixed.

Hardware Requirements

Hardware Platforms with Experimental Only Support:

  • Intel® Arc™ A-Series GPUs

Software Requirements

Windows Subsystem for Linux 2 (WSL2)

Native Linux Running Directly on Hardware

  • Ubuntu 22.04 (64-bit)

  • Intel® GPU Drivers for Linux (installation instructions below)

  • Intel® Arc™ GPU Drivers 803

  • Intel® oneAPI Base Toolkit 2024.1 (installation instructions below)

  • TensorFlow 2.15.0

  • Python 3.9-3.11

  • pip 19.0 or later (requires manylinux2014 support)

Step-By-Step Instructions

1. Install GPU Drivers

Windows Subsystem for Linux 2 (WSL2)

When using WSL2, the GPU drivers are installed in the Windows OS and runtime components such as Level-Zero are installed within Linux (in WSL2).

Windows GPU Drivers
OS Intel GPU Install Intel GPU Driver
Windows 10, Windows 11 Intel® Arc™ A-Series GPUs Intel® Arc™ Graphics Windows Driver 31.0.101.5333

Install the above Intel® Arc™ Graphics Windows DCH Driver in the Windows OS.

Ubuntu Linux Installed in WSL2
OS Intel GPU Install Intel Compute Runtime Components
Ubuntu 22.04 installed in WSL2 Intel® Arc™ A-Series GPUs Refer to the instructions below for package installation in Ubuntu 22.04. When installing the Intel® Arc™ A-Series GPU Drivers 803, please be sure to append the specific version after components, as is done below.

The steps to install the runtime components in Ubuntu Linux (within WSL2) are:

  • Add the repositories.intel.com/graphics package repository to your Ubuntu installation:

    sudo apt-get install -y gpg-agent wget
    wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | 
    sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
    echo "deb [arch=.html64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list
    sudo apt-get update
    
  • Install the necessary runtime packages:

    sudo apt-get install \
        intel-igc-cm \
        intel-level-zero-gpu \
        intel-opencl-icd \
        level-zero \
        libigc1 \
        libigdfcl1 \
        libigdgmm12
    
  • Add the Intel® oneAPI library repositories to your Ubuntu installation:

    wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor --output /usr/share/keyrings/oneapi-archive-keyring.gpg
    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
    sudo apt-get update
    
  • Install the necessary Intel® oneAPI library packages:

    sudo apt-get install intel-oneapi-runtime-dpcpp-cpp intel-oneapi-runtime-mkl
    

The above commands install only runtime libraries for Intel® oneAPI that are used by the Intel® Extension for TensorFlow*. If you would instead prefer to install the full Intel® oneAPI, see section Optional: Install Full Intel® oneAPI Base Toolkit Packages.

Native Linux Running Directly on Hardware

OS Intel GPU Install Intel GPU Driver
Ubuntu 22.04 Intel® Arc™ A-Series GPUs Refer to the instructions below for package installation in Ubuntu 22.04.

The steps to install the runtime components in Ubuntu Linux are:

  • The Intel® Extension for TensorFlow* requires a specific set of drivers for native Linux. Please follow the instructions in Installation Guides for Intel Arc GPUs. When installing the Intel® Arc™ A-Series GPU Drivers 803, setup the LTS repository and install runtime components.

  • Add the repositories.intel.com/graphics package repository to your Ubuntu installation:

    sudo apt-get install -y gpg-agent wget
    wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | 
    sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
    echo "deb [arch=.html64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list
    sudo apt-get update
    
  • Install the necessary runtime packages:

    sudo apt-get install intel-opencl-icd
    
  • Install the Intel® oneAPI libraries

    • Add the Intel® oneAPI library repositories to your Ubuntu installation:

      wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor --output /usr/share/keyrings/oneapi-archive-keyring.gpg
      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
      sudo apt-get update
      
      • Install the necessary Intel® oneAPI library packages:

      sudo apt-get install intel-oneapi-runtime-dpcpp-cpp intel-oneapi-runtime-mkl
      

The above commands install only runtime libraries for Intel® oneAPI that are used by the Intel® Extension for TensorFlow*. If you would instead prefer to install the full Intel® oneAPI, see section Optional: Install Full Intel® oneAPI Base Toolkit Packages.

2. Install TensorFlow* via PyPI Wheel in Linux

The following steps can be used to install the TensorFlow framework and other necessary software in Ubuntu Linux running native (installed directly on hardware) or running within Windows Subsystem for Linux 2.

Install TensorFlow

The Python development and virtual environment setup recommendation by TensorFlow is to isolate package installation from the system.

The Intel® Extension for TensorFlow* requires stock TensorFlow, and the version should be == 2.15.0.

Virtual environment install

You can follow the instructions in stock tensorflow install to activate the virtual environment.

On Linux, it is often necessary to first update pip to a version that supports manylinux2014 wheels.

(tf)$ pip install --upgrade pip

To install in virtual environment, you can run

(tf)$ pip install 'tensorflow==2.15.0'
  • System environment install

    If you prefer to install tensorflow in $HOME, append --user to the commands.

    $ pip install --user 'tensorflow==2.15.0'
    

    And the following system environment install for Intel® Extension for TensorFlow* will also append --user to the commands.

    3. Install Intel® Extension for TensorFlow*

    To install an XPU version in virtual environment, which depends on Intel GPU drivers and oneAPI BaseKit, you can run

    (tf)$ pip install --upgrade intel-extension-for-tensorflow[xpu]
    

    Check the environment for XPU:

    (tf)$ export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"`
    (tf)$ bash ${path_to_site_packages}/intel_extension_for_tensorflow/tools/env_check.sh
    

    4. Verify the Installation

    python -c "import intel_extension_for_tensorflow as itex; print(itex.__version__)"
    

    You can also run a quick_example to verify the installation.

    Optional: Install Full Intel® oneAPI

    If you prefer to have access to full Intel® oneAPI, you need to install at least the following:

    • Intel® oneAPI DPC++ Compiler

    • Intel® oneAPI Math Kernel Library (oneMKL)

    Download and install the verified DPC++ compiler and oneMKL in Ubuntu 22.04.

    $ wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fdc7a2bc-b7a8-47eb-8876-de6201297144/l_BaseKit_p_2024.1.0.596.sh
    # 3 components are necessary: DPC++/C++ Compiler, DPC++ Library and oneMKL
    # if you want to run distributed training with Intel® Optimization for Horovod*, oneCCL is needed too (Intel® oneAPI MPI Library will be installed automatically as its dependency)
    $ sudo sh ./l_BaseKit_p_2024.1.0.596.sh
    

    For any more details, please follow the procedure in Intel® oneAPI Base Toolkit.

    Setup environment variables

    When using the full Intel® oneAPI Base Toolkit, you will need to set up necessary environment variables with:

    source /opt/intel/oneapi/setvars.sh
    

    You may install more components than Intel® Extension for TensorFlow* needs, and if required, setvars.sh can be customized to point to a specific directory by using a configuration file:

    source /opt/intel/oneapi/setvars.sh --config="full/path/to/your/config.txt"