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 Platforms with Experimental Only Support:
- Intel® Arc™ A-Series GPUs
-
For Windows 10 or Windows 11:
- Windows Subystem for Linux 2 (WSL2) with Ubuntu 22.04 (64-bit)
- Windows GPU Drivers: Intel® Arc™ Graphics Windows Driver 31.0.101.5333 or later (installation instructions below)
-
For Ubuntu Linux 22.04 within WSL2:
- Linux Runtime Libraries: Intel® Arc™ GPU Drivers 803 (installation instructions below)
- Intel® oneAPI Base Toolkit 2024.2.1 (installation instructions below)
- TensorFlow 2.15.0
- Python 3.9-3.11
- pip 19.0 or later (requires manylinux2014 support)
- Ubuntu 22.04 (64-bit)
- Intel® GPU Drivers for Linux (installation instructions below)
- Intel® Arc™ GPU Drivers 803
- Intel® oneAPI Base Toolkit 2024.2.1 (installation instructions below)
- TensorFlow 2.15.0
- Python 3.9-3.11
- pip 19.0 or later (requires manylinux2014 support)
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).
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.
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=amd64 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.
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=amd64 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.
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.
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.
-
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'
-
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.
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:
- Option1:
(tf)$ pip install wget
(tf)$ export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"`
(tf)$ python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py
- Option2:
(tf)$ pip install wget
(tf)$ wget https://raw.githubusercontent.com/intel/intel-extension-for-tensorflow/main/tools/python/env_check.py
(tf)$ python env_check.py
python -c "import intel_extension_for_tensorflow as itex; print(itex.__version__)"
You can also run a quick_example to verify the installation.
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/e6ff8e9c-ee28-47fb-abd7-5c524c983e1c/l_BaseKit_p_2024.2.1.100_offline.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.2.1.100_offline.sh
For any more details, please follow the procedure in Intel® oneAPI Base Toolkit.
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"