Skip to content

Commit

Permalink
[Doc] Update release info (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu Teng committed Aug 9, 2024
1 parent ef4c46d commit 8c55fc3
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 49 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This guide introduces the overview of OpenXLA high level integration structure a
## 1. Overview

<p align="center">
<img src="openxla_for_intel_gpu.jpg" width="50%">
<img src="openxla_for_intel_gpu.png" width="50%">
</p>

* [JAX](https://jax.readthedocs.io/en/latest/) provides a familiar NumPy-style API, includes composable function transformations for compilation, batching, automatic differentiation, and parallelization, and the same code executes on multiple backends.
Expand All @@ -26,29 +26,29 @@ This guide introduces the overview of OpenXLA high level integration structure a

Verified Hardware Platforms:

* Intel® Data Center GPU Max Series, Driver Version: [803](https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html)
* Intel® Data Center GPU Max Series, Driver Version: [803](https://dgpu-docs.intel.com/releases/LTS_803.63_20240617.html)

* Intel® Data Center GPU Flex Series 170, Driver Version: [803](https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html)
* Intel® Data Center GPU Flex Series 170, Driver Version: [803](https://dgpu-docs.intel.com/releases/LTS_803.63_20240617.html)

### Software Requirements

* Ubuntu 22.04 (64-bit)
* Intel® Data Center GPU Flex Series
* Ubuntu 22.04, SUSE Linux Enterprise Server(SLES) 15 SP4
* Intel® Data Center GPU Max Series
* Intel® oneAPI Base Toolkit 2024.1
* [Intel® oneAPI Base Toolkit 2024.2](https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-toolkit-release-notes.html)
* Jax/Jaxlib 0.4.26
* Python 3.9-3.12
* pip 19.0 or later (requires manylinux2014 support)

**NOTE: Since Jax has its own [platform limitation](https://jax.readthedocs.io/en/latest/installation.html#supported-platforms) (Ubuntu 20.04 or later), real software requirements is restricted when works with Jax.**
**NOTE: Since JAX has its own [platform limitation](https://jax.readthedocs.io/en/latest/installation.html#supported-platforms) (Ubuntu 20.04 or later), real software requirements is restricted when works with JAX.**

### Install Intel GPU Drivers

|OS|Intel GPU|Install Intel GPU Driver|
|-|-|-|
|Ubuntu 22.04 |Intel® Data Center GPU Flex Series| Refer to the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html#intel-data-center-gpu-flex-series) for latest driver installation. If install the verified Intel® Data Center GPU Max Series/Intel® Data Center GPU Flex Series [803](https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html), please append the specific version after components, such as `sudo apt-get install intel-opencl-icd==23.43.27642.38-803~22.04`|
|Ubuntu 22.04, SLES 15 SP4|Intel® Data Center GPU Max Series| Refer to the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html#intel-data-center-gpu-max-series) for latest driver installation. If install the verified Intel® Data Center GPU Max Series/Intel® Data Center GPU Flex Series [803](https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html), please append the specific version after components, such as `sudo apt-get install intel-opencl-icd==23.43.27642.38-803~22.04`|
|Ubuntu 22.04 |Intel® Data Center GPU Flex Series| Refer to the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html#intel-data-center-gpu-flex-series) for latest driver installation. If install the verified Intel® Data Center GPU Max Series/Intel® Data Center GPU Flex Series [803](https://dgpu-docs.intel.com/releases/LTS_803.63_20240617.html), please append the specific version after components, such as `sudo apt-get install intel-opencl-icd==23.43.27642.52-803~22.04`|
|Ubuntu 22.04, SLES 15 SP4|Intel® Data Center GPU Max Series| Refer to the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html#intel-data-center-gpu-max-series) for latest driver installation. If install the verified Intel® Data Center GPU Max Series/Intel® Data Center GPU Flex Series [803](https://dgpu-docs.intel.com/releases/LTS_803.63_20240617.html), please append the specific version after components, such as `sudo apt-get install intel-opencl-icd==23.43.27642.52-803~22.04`|

### Install oneAPI Base Toolkit Packages

Expand All @@ -58,34 +58,34 @@ Need to install components of Intel® oneAPI Base Toolkit:
* Intel® oneAPI Math Kernel Library (oneMKL)

```bash
$ wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fdc7a2bc-b7a8-47eb-8876-de6201297144/l_BaseKit_p_2024.1.0.596.sh
$ wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e6ff8e9c-ee28-47fb-abd7-5c524c983e1c/l_BaseKit_p_2024.2.1.100_offline.sh
# 2 components are necessary: DPC++/C++ Compiler and oneMKL
sudo sh l_BaseKit_p_2024.1.0.596.sh
sudo sh l_BaseKit_p_2024.2.1.100_offline.sh

# Source OneAPI env
source /opt/intel/oneapi/compiler/2024.1/env/vars.sh
source /opt/intel/oneapi/mkl/2024.1/env/vars.sh
source /opt/intel/oneapi/compiler/2024.2/env/vars.sh
source /opt/intel/oneapi/mkl/2024.2/env/vars.sh
```

**Backup**: Recommend to rollback to **Toolkit 2024.0** if need collective feature. See [Release Notes](https://github.com/intel-innersource/frameworks.ai.intel-extension-for-openxla.intel-extension-for-openxla/releases) for more details.
**Backup**: Recommend to rollback to **Toolkit 2024.1** if meet performance issue. See [Release Notes](https://github.com/intel/intel-extension-for-openxla/releases) for more details.
```bash
wget https://registrationcenter-download.intel.com/akdlm//IRC_NAS/20f4e6a1-6b0b-4752-b8c1-e5eacba10e01/l_BaseKit_p_2024.0.0.49564.sh
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fdc7a2bc-b7a8-47eb-8876-de6201297144/l_BaseKit_p_2024.1.0.596.sh
# 2 components are necessary: DPC++/C++ Compiler and oneMKL
sudo sh l_BaseKit_p_2024.0.0.49564.sh
sudo sh l_BaseKit_p_2024.1.0.596.sh

# Source OneAPI env
source /opt/intel/oneapi/compiler/2024.0/env/vars.sh
source /opt/intel/oneapi/mkl/2024.0/env/vars.sh
source /opt/intel/oneapi/compiler/2024.1/env/vars.sh
source /opt/intel/oneapi/mkl/2024.1/env/vars.sh
```

### Install Jax and Jaxlib

```bash
pip install -r test/requirements.txt
pip install -r https://raw.githubusercontent.com/intel/intel-extension-for-openxla/main/test/requirements.txt
```
Check [test/requirements.txt](test/requirements.txt) for more details.
Please refer to [test/requirements.txt](test/requirements.txt) for the version dependency of `jax`, `jaxlib` and `flax`.

The following table tracks intel-extension-for-openxla versions and compatible versions of jax and jaxlib. The compatibility between jax and jaxlib is maintained through JAX. This version restriction will be relaxed over time as the plugin API matures.
The following table tracks intel-extension-for-openxla versions and compatible versions of `jax` and `jaxlib`. The compatibility between `jax` and `jaxlib` is maintained through JAX. This version restriction will be relaxed over time as the plugin API matures.
|**intel-extension-for-openxla**|**jaxlib**|**jax**|
|:-:|:-:|:-:|
| 0.4.0 | 0.4.26 | >= 0.4.26, <= 0.4.27|
Expand Down
37 changes: 8 additions & 29 deletions docs/acc_jax.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
# Accelerated JAX on Intel GPU

## Intel® Extension for OpenXLA* plug-in
Intel® Extension for OpenXLA includes PJRT plugin implementation, which seamlessly runs JAX models on Intel GPU. The PJRT API simplified the integration, which allowed the Intel GPU plugin to be developed separately and quickly integrated into JAX. Refer to [OpenXLA PJRT Plugin RFC](https://github.com/openxla/community/blob/main/rfcs/20230123-pjrt-plugin.md) for more details.
Intel® Extension for OpenXLA* includes PJRT plugin implementation, which seamlessly runs JAX models on Intel GPU. The PJRT API simplified the integration, which allowed the Intel GPU plugin to be developed separately and quickly integrated into JAX. Refer to [OpenXLA PJRT Plugin RFC](https://github.com/openxla/community/blob/main/rfcs/20230123-pjrt-plugin.md) for more details.

## Requirements

### Hardware Requirements

Verified Hardware Platforms:

* Intel® Data Center GPU Max Series, Driver Version: [803](https://dgpu-docs.intel.com/releases/LTS_803.63_20240617.html) ([Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html#intel-data-center-gpu-max-series))

* Intel® Data Center GPU Flex Series 170, Driver Version: [803](https://dgpu-docs.intel.com/releases/LTS_803.63_20240617.html) ([Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html#intel-data-center-gpu-flex-series))

### Software Requirements

* Ubuntu 22.04 (64-bit)
* Intel® Data Center GPU Flex Series
* Ubuntu 22.04, SUSE Linux Enterprise Server(SLES) 15 SP4
* Intel® Data Center GPU Max Series
* Intel® oneAPI Base Toolkit 2024.1 ([Installation Guides](https://github.com/intel/intel-extension-for-openxla/?tab=readme-ov-file#install-oneapi-base-toolkit-packages))
* Jax/Jaxlib 0.4.26
* Python 3.9-3.12
* pip 19.0 or later (requires manylinux2014 support)
Please check [README#requirements](../README.md#2-requirements) for the requirements of hardware and software.

## Install
The following table tracks intel-extension-for-openxla versions and compatible versions of jax and jaxlib. The compatibility between jax and jaxlib is maintained through JAX. This version restriction will be relaxed over time as the plugin API matures.
The following table tracks intel-extension-for-openxla versions and compatible versions of `jax` and `jaxlib`. The compatibility between `jax` and `jaxlib` is maintained through JAX. This version restriction will be relaxed over time as the plugin API matures.
|**intel-extension-for-openxla**|**jaxlib**|**jax**|
|:-:|:-:|:-:|
| 0.4.0 | 0.4.26 | >= 0.4.26, <= 0.4.27|
Expand All @@ -39,9 +21,12 @@ The following table tracks intel-extension-for-openxla versions and compatible v
conda create -n jax-ioex python=3.10
conda activate jax-ioex
pip install -U pip
pip install jax==0.4.26 jaxlib==0.4.26
pip install intel-extension-for-openxla
# Install jax, jaxlib and flax dependency
pip install -r https://raw.githubusercontent.com/intel/intel-extension-for-openxla/main/test/requirements.txt
```
Please refer to [requirements.txt](../test/requirements.txt) for the version dependency of `jax`, `jaxlib` and `flax`.

## Verify
```
Expand All @@ -61,12 +46,8 @@ bash Miniforge3-$(uname)-$(uname -m).sh
```

### Setup environment
Please follow [Install](#install) to prepare the basic environment first.
```
conda create -n stable-diffusion python=3.10
conda activate stable-diffusion
pip install -U pip
pip install jax==0.4.26 jaxlib==0.4.26 flax==0.8.2
pip install intel-extension-for-openxla
pip install transformers==4.38 diffusers==0.26.3 datasets==2.12.0 msgpack==1.0.7
```
Source OneAPI env
Expand All @@ -76,9 +57,7 @@ source /opt/intel/oneapi/mkl/2024.2/env/vars.sh
```
**NOTE**: The path of OneAPI env script is based on the OneAPI installed path.


### Run Demo (Stable Diffusion Inference)

Go to [example/stable_diffusion](../example/stable_diffusion/README.md) for detail about this demo.

| **Command** | **Model** | **Output Image Resolution** |
Expand Down
2 changes: 1 addition & 1 deletion example/gptj/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Script jax_gptj.py for [EleutherAI/gpt-j-6B](https://huggingface.co/EleutherAI/g
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
```bash
cd <WORKSPACE>/example/gptj/
pip transformers==4.38 datasets==2.20.0
pip install transformers==4.38 datasets==2.20.0
pip install -r ../../test/requirements.txt
```

Expand Down
Binary file removed openxla_for_intel_gpu.jpg
Binary file not shown.
Binary file added openxla_for_intel_gpu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions xla/tools/pip_package/xla_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def finalize_options(self):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
Expand Down

0 comments on commit 8c55fc3

Please sign in to comment.