Skip to content

Commit 3281fa7

Browse files
mayuyuaceSolaryeeLuFinchLu Tengyisonzhu
authored
rebase 0.4.26 (#327)
Co-authored-by: Sheng, Yang <[email protected]> Co-authored-by: fengqing.lu <[email protected]> Co-authored-by: Lu Teng <[email protected]> Co-authored-by: yisonzhu <[email protected]> Co-authored-by: lingzhi98 <[email protected]>
1 parent 99f3efc commit 3281fa7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4493
-4852
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ This guide introduces the overview of OpenXLA high level integration structure a
1313

1414
## 1. Overview
1515

16-
<p align="center">
17-
<img src="openxla_for_intel_gpu.jpg" width="50%">
18-
</p>
16+
<p align="center">
17+
<img src="openxla_for_intel_gpu.jpg" width="50%">
18+
</p>
1919

2020
* [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.
2121
* TensorFlow and PyTorch support is on the way.
@@ -37,8 +37,8 @@ Verified Hardware Platforms:
3737
* Ubuntu 22.04, SUSE Linux Enterprise Server(SLES) 15 SP4
3838
* Intel® Data Center GPU Max Series
3939
* Intel® oneAPI Base Toolkit 2024.1
40-
* Jax/Jaxlib 0.4.25
41-
* Python 3.9-3.11
40+
* Jax/Jaxlib 0.4.26
41+
* Python 3.9-3.12
4242
* pip 19.0 or later (requires manylinux2014 support)
4343

4444
**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.**
@@ -81,8 +81,9 @@ source /opt/intel/oneapi/mkl/2024.0/env/vars.sh
8181
### Install Jax and Jaxlib
8282

8383
```bash
84-
pip install jax==0.4.25 jaxlib==0.4.25
84+
pip install -r test/requirements.txt
8585
```
86+
Check [test/requirements.txt](test/requirements.txt) for more details.
8687

8788
## 3. Install
8889

@@ -100,7 +101,7 @@ git clone https://github.com/intel/intel-extension-for-openxla.git
100101
./configure # Choose Yes for all.
101102
bazel build //xla/tools/pip_package:build_pip_package
102103
./bazel-bin/xla/tools/pip_package/build_pip_package ./
103-
pip install intel_extension_for_openxla-0.3.0-cp39-cp39-linux_x86_64.whl
104+
pip install intel_extension_for_openxla-0.4.0-cp39-cp39-linux_x86_64.whl
104105
```
105106

106107
**Aditional Build Option**:

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ http_archive(
1414
name = "xla",
1515
patch_args = ["-p1"],
1616
patches = ["//third_party:openxla.patch"],
17-
sha256 = "8a59b9af7d0850059d7043f7043c780066d61538f3af536e8a10d3d717f35089",
18-
strip_prefix = "xla-4ccfe33c71665ddcbca5b127fefe8baa3ed632d4",
17+
sha256 = "fa6e7d17acc362b56c57c43224e6e3eca8569adae864e2fa191cc9d13edf4309",
18+
strip_prefix = "xla-4e8e23f16bc925b6f27817de098a8e1e81296bb5",
1919
urls = [
20-
"https://github.com/openxla/xla/archive/4ccfe33c71665ddcbca5b127fefe8baa3ed632d4.tar.gz",
20+
"https://github.com/openxla/xla/archive/4e8e23f16bc925b6f27817de098a8e1e81296bb5.tar.gz",
2121
],
2222
)
2323

example/bert/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Quick Start for fine-tunes BERT on SQuAD
2-
Fine-tunes BERT model on SQuAD task by [Question Answering examples](https://github.com/huggingface/transformers/tree/v4.37.0/examples/flax/question-answering).
2+
Fine-tunes BERT model on SQuAD task by [Question Answering examples](https://github.com/huggingface/transformers/tree/v4.38.0/examples/flax/question-answering).
33
This expample is referred from [HuggingFace Transformers](https://github.com/huggingface/transformers). See [Backup](#Backup) for modification details.
44

55
## Requirements
@@ -10,9 +10,9 @@ Please got the [main page](https://github.com/intel/intel-extension-for-openxla/
1010
### 2. Install dependency
1111
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
1212
```bash
13-
pip install jax==0.4.25 jaxlib==0.4.25 flax==0.8.2
1413
cd <WORKSPACE>/example/bert
1514
pip install -r requirements.txt
15+
pip install -r ../../test/requirements.txt
1616
```
1717

1818
### 3. Download pre-trained model

example/bert/requirements.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
datasets>=1.8.0
2-
jax==0.4.25
3-
jaxlib==0.4.25
4-
flax>=0.8.2
1+
datasets==2.20.0
52
optax>=0.0.8
63
transformers==4.38
74
evaluate>=0.4.1

example/fp8/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ export KAGGLE_KEY=xxxxxxxx
1111

1212
## Package dependency
1313

14+
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
1415
```bash
15-
pip install keras keras_nlp kagglehub
16+
cd <WORKSPACE>/example/fp8/
17+
pip install keras-nlp==0.10.0 keras==3.3.2 kagglehub==0.2.5
18+
pip install -r ../../test/requirements.txt
1619
```
1720

1821
## Dataset

example/gemma/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ export KAGGLE_KEY=xxxxxxxx
1313

1414
### Prerequisites
1515

16+
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
1617
```bash
17-
pip install jax==0.4.25 jaxlib==0.4.25 keras-nlp==0.10.0 keras==3.3.2
18+
cd <WORKSPACE>/example/gemma/
19+
pip install keras-nlp==0.10.0 keras==3.3.2
20+
pip install -r ../../test/requirements.txt
1821
```
1922

2023
### Options

example/gptj/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ Script jax_gptj.py for [EleutherAI/gpt-j-6B](https://huggingface.co/EleutherAI/g
44

55
## Prerequisites
66

7+
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
78
```bash
8-
pip install jax==0.4.25 jaxlib==0.4.25 flax==0.8.2 transformers==4.38 datasets==2.12.0
9+
cd <WORKSPACE>/example/gptj/
10+
pip transformers==4.38 datasets==2.20.0
11+
pip install -r ../../test/requirements.txt
912
```
1013

1114
## Options

example/grok/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ Loading and running the Grok-1 open-weights model by [Grok-1](https://github.com
66

77
Please got the [main page](https://github.com/intel/intel-extension-for-openxla/blob/main/README.md#build-and-install), and follow the instructions to build and install intel-extension-for-openxla.
88

9-
## 2. Install jax and flax
10-
```bash
11-
pip install jax==0.4.25 jaxlib==0.4.25
12-
```
13-
## 3. Install dependency
9+
## 2. Install dependency
10+
11+
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
1412
```bash
13+
cd <WORKSPACE>/example/grok/
1514
git clone https://github.com/xai-org/grok-1.git
1615
pip install -r grok-1/requirements.txt
16+
pip install -r ../../test/requirements.txt
1717
```
18-
## 4. Download the weights
18+
19+
## 3. Download the weights
1920

2021
Please follow [Downloading the weights](https://github.com/xai-org/grok-1#downloading-the-weights) to get the weights.
2122

@@ -30,7 +31,7 @@ grok-1/
3031
├── ...
3132
```
3233

33-
## 5. Copy files & Run
34+
## 4. Copy files & Run
3435
```bash
3536
cp prompt.json inference.py grok-1
3637
python grok-1/inference.py

example/resnet50/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ Trains ResNet50 model (He et al., 2016) for the ImageNet classification task (Ru
88

99
Please got the [main page](https://github.com/intel/intel-extension-for-openxla/blob/main/README.md#build-and-install), and follow the instructions to build and install intel-extension-for-openxla.
1010

11-
### 2. Install jax and flax
12-
```bash
13-
pip install jax==0.4.25 jaxlib==0.4.25
14-
```
15-
### 3. Install dependency
11+
### 2. Install dependency
12+
13+
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
1614
```bash
15+
cd <WORKSPACE>/example/resnet50/
1716
git clone --branch=main https://github.com/google/flax
1817
cd flax
1918
git checkout ba9e24a7b697e6407465cb4b05a24a4cea152248
20-
cd examples/imagenet
21-
pip install -r requirements.txt
19+
pip install -r examples/imagenet/requirements.txt
20+
cd ..
21+
pip install -r ../../test/requirements.txt
2222
```
23-
### 4. Download dataset
23+
24+
### 3. Download dataset
2425

2526
Please follow [Preparing the dataset](https://github.com/google/flax/tree/main/examples/imagenet#preparing-the-dataset) to get imagenet dataset.
2627

example/sdxl/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ More details could be found in [Stability-AI/generative-models](https://github.c
1414

1515
please got the [main page](https://github.com/intel/intel-extension-for-openxla/blob/main/README.md#build-and-install), and follow the instructions to build and install intel-extension-for-openxla.
1616

17-
### 2. Install jax
18-
```bash
19-
pip install jax==0.4.25 jaxlib==0.4.25 flax==0.8.2
20-
```
21-
### 3. Install huggingface transformers
17+
### 2. Install packages
2218

19+
Mark `intel-extension-for-openxla` folder as \<WORKSPACE\>, then
2320
```bash
24-
pip install transformers==4.38 diffusers==0.26.3 datasets==2.12.0 msgpack==1.0.7
21+
cd <WORKSPACE>/example/sdxl/
22+
pip install transformers==4.38 diffusers==0.26.3 datasets==2.20.0 msgpack==1.0.7
23+
pip install -r ../../test/requirements.txt
2524
```
25+
2626
## Run
2727

2828
### 1. Environmental Variables

0 commit comments

Comments
 (0)