You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [OpenXLA](https://github.com/openxla/xla) Project brings together a community of developers and leading AI/ML teams to accelerate ML and address infrastructure fragmentation across ML frameworks and hardware.
3
9
@@ -6,65 +12,93 @@ Intel® Extension for OpenXLA includes PJRT plugin implementation, which seamles
6
12
This guide introduces the overview of OpenXLA high level integration structure and demonstrates how to build Intel® Extension for OpenXLA and run JAX example with OpenXLA on Intel GPU. JAX is the first supported front-end.
7
13
8
14
## 1. Overview
15
+
9
16
<palign="center">
10
17
<img src="openxla_for_intel_gpu.jpg" width="50%">
11
18
</p>
12
19
13
20
*[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.
14
21
* TensorFlow and PyTorch support is on the way.
15
22
16
-
## 2. Hardware and Software Requirement
23
+
## 2. Requirements
17
24
18
25
### Hardware Requirements
19
26
20
27
Verified Hardware Platforms:
21
-
- Intel® Data Center GPU Max Series, Driver Version: [682](https://dgpu-docs.intel.com/releases/production_682.14_20230804.html)
22
-
- Intel® Data Center GPU Flex Series 170, Driver Version: [682](https://dgpu-docs.intel.com/releases/production_682.14_20230804.html)
28
+
29
+
* Intel® Data Center GPU Max Series, Driver Version: [682](https://dgpu-docs.intel.com/releases/production_682.14_20230804.html)
30
+
31
+
* Intel® Data Center GPU Flex Series 170, Driver Version: [682](https://dgpu-docs.intel.com/releases/production_682.14_20230804.html)
23
32
24
33
### Software Requirements
25
-
- Ubuntu 22.04, Red Hat 8.6/8.8/9.2 (64-bit)
26
-
- Intel® Data Center GPU Flex Series
27
-
- Ubuntu 22.04, Red Hat 8.6/8.8/9.2 (64-bit), SUSE Linux Enterprise Server(SLES) 15 SP4
28
-
- Intel® Data Center GPU Max Series
29
-
- Intel® oneAPI Base Toolkit 2023.1
30
-
- Jax/Jaxlib 0.4.13
31
-
- Python 3.9-3.11
32
-
- pip 19.0 or later (requires manylinux2014 support)
33
34
35
+
* Ubuntu 22.04, Red Hat 8.6/8.8/9.2 (64-bit)
36
+
* Intel® Data Center GPU Flex Series
37
+
* Ubuntu 22.04, Red Hat 8.6/8.8/9.2 (64-bit), SUSE Linux Enterprise Server(SLES) 15 SP4
38
+
* Intel® Data Center GPU Max Series
39
+
* Intel® oneAPI Base Toolkit 2023.1
40
+
* Jax/Jaxlib 0.4.13
41
+
* Python 3.9-3.11
42
+
* pip 19.0 or later (requires manylinux2014 support)
34
43
35
-
### Install GPU Drivers
44
+
### Install Intel GPU Drivers
36
45
37
46
|OS|Intel GPU|Install Intel GPU Driver|
38
47
|-|-|-|
39
48
|Ubuntu 22.04, Red Hat 8.6/8.8/9.2|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 [682](https://dgpu-docs.intel.com/releases/production_682.14_20230804.html), please append the specific version after components, such as `sudo apt-get install intel-opencl-icd==23.22.26516.25-682~22.04`|
40
49
|Ubuntu 22.04, Red Hat 8.6/8.8/9.2, 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 [682](https://dgpu-docs.intel.com/releases/production_682.14_20230804.html), please append the specific version after components, such as `sudo apt-get install intel-opencl-icd==23.22.26516.25-682~22.04`|
41
50
42
-
## Build and Install
51
+
### Install oneAPI Base Toolkit Packages
52
+
53
+
Need to install components of Intel® oneAPI Base Toolkit:
54
+
55
+
* Intel® oneAPI DPC++ Compiler
56
+
* Intel® oneAPI Math Kernel Library (oneMKL)
57
+
* Intel® oneAPI Threading Building Blocks (TBB), dependency of DPC++ Compiler.
This repo pulls public openxla code as its third_party. For development, one often wants to make changes to the XLA repository as well. You can override the pinned xla repo with a local checkout by:
* Besides python whl, we can also build .so `bazel build //xla:pjrt_plugin_xpu.so` and run with ENV `PJRT_NAMES_AND_LIBRARY_PATHS='xpu:Your_openxla_path/bazel-bin/xla/pjrt_plugin_xpu.so'`
This repo pulls public XLA code as its third party build dependency. As an openxla developer, you may need to modify and override this specific XLA repo with a local checkout version by the following command:
***Q**: There is an error 'No visible XPU devices'.
107
-
**A**:
108
-
Print `jax.local_devices()` to check which device is running. Set `export OCL_ICD_ENABLE_TRACE=1` to check if there are driver error messages. The following code opens more debug log for JAX app.
109
-
```python
110
-
import logging
111
-
logging.basicConfig(level = logging.DEBUG)
112
-
```
113
-
***Q**: There is an error 'version GLIBCXX_3.4.30' not found.
114
-
**A**: please upgrade libstdc++ to the latest, for example for conda
1. If there is an error 'No visible XPU devices', print `jax.local_devices()` to check which device is running. Set `export OCL_ICD_ENABLE_TRACE=1` to check if there are driver error messages. The following code opens more debug log for JAX app.
143
+
144
+
```python
145
+
import logging
146
+
logging.basicConfig(level= logging.DEBUG)
147
+
```
148
+
149
+
2. If there is an error 'version GLIBCXX_3.4.30'not found, upgrade libstdc++ to the latest, for example for conda
0 commit comments