Skip to content

Commit 0d689f1

Browse files
authored
update docs for 1.13.120+xpu release (#2587)
1 parent c2a3701 commit 0d689f1

File tree

16 files changed

+283
-174
lines changed

16 files changed

+283
-174
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ The extension can be loaded as a Python module for Python programs or linked as
1515

1616
You can use either of the following 2 commands to install Intel® Extension for PyTorch\* CPU version.
1717

18-
```python
18+
```bash
1919
python -m pip install intel_extension_for_pytorch
20-
```
21-
22-
```python
2320
python -m pip install intel_extension_for_pytorch -f https://developer.intel.com/ipex-whl-stable-cpu
2421
```
2522

@@ -33,9 +30,8 @@ Compilation instruction of the latest CPU code base `master` branch can be found
3330

3431
You can install Intel® Extension for PyTorch\* for GPU via command below.
3532

36-
```python
37-
python -m pip install torch==1.13.0a0 -f https://developer.intel.com/ipex-whl-stable-xpu
38-
python -m pip install intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
33+
```bash
34+
python -m pip install torch==1.13.0a0+git6c9b55e intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
3935
```
4036

4137
**Note:** The patched PyTorch 1.13.0a0 is required to work with Intel® Extension for PyTorch\* on Intel® graphics card for now.
@@ -88,7 +84,7 @@ with torch.no_grad():
8884

8985
## License
9086

91-
_Apache License_, Version _2.0_. As found in [LICENSE](https://github.com/intel/intel-extension-for-pytorch/blob/master/LICENSE.txt) file.
87+
_Apache License_, Version _2.0_. As found in [LICENSE](https://github.com/intel/intel-extension-for-pytorch/blob/master/LICENSE) file.
9288

9389
## Security
9490

docs/tutorials/blogs_publications.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Blogs & Publications
22
====================
33

4-
* [Accelerate PyTorch\* INT8 Inference with New “X86” Quantization Backend on X86 CPUs](https://www.intel.com/content/www/us/en/developer/articles/technical/accelerate-pytorch-int8-inf-with-new-x86-backend.html)
5-
* [Intel® Deep Learning Boost - Improve Inference Performance of BERT Base Model from Hugging Face for Network Security Technology Guide](https://networkbuilders.intel.com/solutionslibrary/intel-deep-learning-boost-improve-inference-performance-of-bert-base-model-from-hugging-face-for-network-security-technology-guide)
4+
* [Intel® Deep Learning Boost (Intel® DL Boost) - Improve Inference Performance of Hugging Face BERT Base Model in Google Cloud Platform (GCP) Technology Guide, Apr 2023](https://networkbuilders.intel.com/solutionslibrary/intel-deep-learning-boost-intel-dl-boost-improve-inference-performance-of-hugging-face-bert-base-model-in-google-cloud-platform-gcp-technology-guide)
5+
* [Get Started with Intel® Extension for PyTorch\* on GPU | Intel Software, Mar 2023](https://www.youtube.com/watch?v=Id-rE2Q7xZ0&t=1s)
6+
* [Accelerate PyTorch\* INT8 Inference with New “X86” Quantization Backend on X86 CPUs, Mar 2023](https://www.intel.com/content/www/us/en/developer/articles/technical/accelerate-pytorch-int8-inf-with-new-x86-backend.html)
67
* [Accelerating PyTorch Transformers with Intel Sapphire Rapids, Part 1, Jan 2023](https://huggingface.co/blog/intel-sapphire-rapids)
78
* [Intel® Deep Learning Boost - Improve Inference Performance of BERT Base Model from Hugging Face for Network Security Technology Guide, Jan 2023](https://networkbuilders.intel.com/solutionslibrary/intel-deep-learning-boost-improve-inference-performance-of-bert-base-model-from-hugging-face-for-network-security-technology-guide)
89
* [Scaling inference on CPUs with TorchServe, PyTorch Conference, Dec 2022](https://www.youtube.com/watch?v=066_Jd6cwZg)

docs/tutorials/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,4 @@ Intel® Extension for PyTorch\* provides its C++ dynamic library to allow users
166166

167167
## Model Zoo
168168

169-
Use cases that had already been optimized by Intel engineers are available at [Model Zoo for Intel® Architecture](https://github.com/IntelAI/models/tree/v2.9.0). A bunch of PyTorch use cases for benchmarking are also available on the [GitHub page](https://github.com/IntelAI/models/tree/v2.9.0#use-cases). Models verified on Intel dGPUs are marked in `Model Documentation` Column. You can get performance benefits out-of-box by simply running scipts in the Model Zoo.
169+
Use cases that had already been optimized by Intel engineers are available at [Model Zoo for Intel® Architecture](https://github.com/IntelAI/models/tree/v2.11.0). A bunch of PyTorch use cases for benchmarking are also available on the [GitHub page](https://github.com/IntelAI/models/tree/v2.11.0#use-cases). Models verified on Intel dGPUs are marked in `Model Documentation` Column. You can get performance benefits out-of-box by simply running scipts in the Model Zoo.

docs/tutorials/features.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Intel® Extension for PyTorch* also optimizes operators and implements several c
163163
.. currentmodule:: intel_extension_for_pytorch.nn.functional
164164
.. autofunction:: interaction
165165

166-
**Auto kernel selection** is a feature that enables users to tune for better performance with GEMM operations. It is provided as parameter –auto_kernel_selection, with boolean value, of the ipex.optimize() function. By default, the GEMM kernel is computed with oneMKL primitives. However, under certain circumstances oneDNN primitives run faster. Users are able to set –auto_kernel_selection to True to run GEMM kernels with oneDNN primitives.” -> "We aims to provide good default performance by leveraging the best of math libraries and enabled weights_prepack, and it has been verified with broad set of models. If you would like to try other alternatives, you can use auto_kernel_selection toggle in ipex.optimize to switch, and you can diesable weights_preack in ipex.optimize if you are concerning the memory footprint more than performance gain. However in majority cases, keeping default is what we recommend.
166+
**Auto kernel selection** is a feature that enables users to tune for better performance with GEMM operations. It is provided as parameter –auto_kernel_selection, with boolean value, of the ipex.optimize() function. By default, the GEMM kernel is computed with oneMKL primitives. However, under certain circumstances oneDNN primitives run faster. Users are able to set –auto_kernel_selection to True to run GEMM kernels with oneDNN primitives.” -> "We aim to provide good default performance by leveraging the best of math libraries and enabled weights_prepack, and it has been verified with broad set of models. If you would like to try other alternatives, you can use auto_kernel_selection toggle in ipex.optimize to switch, and you can disable weights_preack in ipex.optimize if you are concerning the memory footprint more than performance gain. However in majority cases, keeping default is what we recommend.
167167

168168

169169
Runtime Extension

docs/tutorials/features/DDP.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,28 @@ python setup.py install
3232

3333
Installation for GPU:
3434

35+
- Clone the `oneccl_bindings_for_pytorch`
36+
3537
```bash
36-
git clone https://github.com/intel/torch-ccl.git -b v1.13.100+gpu
38+
git clone https://github.com/intel/torch-ccl.git -b v1.13.200+gpu
3739
cd torch-ccl
3840
git submodule sync
3941
git submodule update --init --recursive
40-
BUILD_NO_ONECCL_PACKAGE=ON COMPUTE_BACKEND=dpcpp python setup.py install
42+
```
43+
44+
- Install `oneccl_bindings_for_pytorch`
45+
46+
Option 1: build with oneCCL from third party (recommended)
47+
48+
```bash
49+
COMPUTE_BACKEND=dpcpp python setup.py install
50+
```
51+
52+
Option 2: build without oneCCL and use oneCCL in system
53+
54+
```bash
55+
export INTELONEAPIROOT=${HOME}/intel/oneapi
56+
USE_SYSTEM_ONECCL=ON COMPUTE_BACKEND=dpcpp python setup.py install
4157
```
4258

4359
#### Install from prebuilt wheel:

docs/tutorials/features/graph_capture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Graph Capture (Experimental)
33

44
### Feature Description
55

6-
This feature automatically applies a combination of TorchScript trace technique and TorchDynamo to try to generate a graph model, for providing a good user experience while keep execution fast. Specifically, the process tries to generate a graph with TorchScript trace functionality first. In case of generation failure or incorrect results detected, it changes to TorchDynamo with TorchScript backend. Failure of the graph generation with TorchDynamo triggers a warning message. Meanwhile the generated graph model falls back to the original one. I.e. the inference workload runs in eager mode. Users can take advantage of this feature through a new knob `--graph_mode` of the `ipex.optimize()` function to automatically run into graph mode.
6+
This feature automatically applies a combination of TorchScript trace technique and TorchDynamo to try to generate a graph model, for providing a good user experience while keeping execution fast. Specifically, the process tries to generate a graph with TorchScript trace functionality first. In case of generation failure or incorrect results detected, it changes to TorchDynamo with TorchScript backend. Failure of the graph generation with TorchDynamo triggers a warning message. Meanwhile the generated graph model falls back to the original one. I.e. the inference workload runs in eager mode. Users can take advantage of this feature through a new knob `--graph_mode` of the `ipex.optimize()` function to automatically run into graph mode.
77

88
### Usage Example
99

docs/tutorials/features/int8_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Note: For weight observer, it only supports dtype **torch.qint8**, and the qsche
109109
**Suggestion**:
110110

111111
1. For weight observer, setting **qscheme** to **torch.per_channel_symmetric** can get a better accuracy.
112-
2. If your CPU device doesn't support VNNI, seeting the observer's **reduce_range** to **True** can get a better accuracy, such as skylake.
112+
2. If your CPU device doesn't support VNNI, setting the observer's **reduce_range** to **True** can get a better accuracy, such as skylake.
113113

114114
### Prepare Model
115115

docs/tutorials/features/nhwc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ The general guideline has been listed under reference [Writing-memory-format-awa
162162

163163
### b. Register oneDNN Kernel on Channels Last
164164

165-
Registering a oneDNN kernel under Channels Last memory format on CPU is no different from [cuDNN](https://github.com/pytorch/pytorch/pull/23861): Only very few upper level changes are needed, such as accommodate 'contiguous()' to 'contiguous(suggested_memory_format)'. The automatic reorder of oneDNN weight shall been hidden in ideep.
165+
Registering a oneDNN kernel under Channels Last memory format on CPU is no different from [cuDNN](https://github.com/pytorch/pytorch/pull/23861): Only very few upper level changes are needed, such as accommodate 'contiguous()' to 'contiguous(suggested_memory_format)'. The automatic reorder of oneDNN weight shall have been hidden in ideep.
166166

167167
## oneDNN NHWC APIs
168168

docs/tutorials/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Prebuilt wheel files are released for multiple Python versions. You can install them simply with the following pip command.
66

77
```bash
8-
python -m pip install torch==1.13.1+xpu torchvision==0.14.1+xpu intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
8+
python -m pip install torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
99
```
1010

1111
You can run a simple sanity test to double confirm if the correct version is installed, and if the software stack can get correct hardware information onboard your system.

docs/tutorials/installation.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ Verified Hardware Platforms:
1616

1717
|Hardware|OS|Driver|
1818
|-|-|-|
19-
|Intel® Data Center GPU Flex Series|Ubuntu 22.04 (Validated), Red Hat 8.6|[Stable 540](https://dgpu-docs.intel.com/releases/stable_540_20221205.html)|
20-
|Intel® Data Center GPU Max Series|Red Hat 8.6, Sles 15sp3/sp4 (Validated)|[Stable 540](https://dgpu-docs.intel.com/releases/stable_540_20221205.html)|
21-
|Intel® Arc™ A-Series Graphics|Ubuntu 22.04|[Stable 540](https://dgpu-docs.intel.com/releases/stable_540_20221205.html)|
22-
|Intel® Arc™ A-Series Graphics|Windows 11 or Windows 10 21H2 (via WSL2)|[for Windows 11 or Windows 10 21H2](https://www.intel.com/content/www/us/en/download/726609/intel-arc-graphics-windows-dch-driver.html)|
23-
|CPU (3<sup>rd</sup> and 4<sup>th</sup> Gen of Intel® Xeon® Scalable Processors)|Linux\* distributions with glibc>=2.17. Validated on Ubuntu 18.04.|N/A|
24-
25-
- Intel® oneAPI Base Toolkit 2023.0
19+
|Intel® Data Center GPU Flex Series|Ubuntu 22.04 (Validated), Red Hat 8.6|[Stable 602](https://dgpu-docs.intel.com/releases/stable_602_20230323.html)|
20+
|Intel® Data Center GPU Max Series|Ubuntu 22.04, Red Hat 8.6, Sles 15sp3/sp4 (Validated)|[Stable 602](https://dgpu-docs.intel.com/releases/stable_602_20230323.html)|
21+
|Intel® Arc™ A-Series Graphics|Ubuntu 22.04|[Stable 602](https://dgpu-docs.intel.com/releases/stable_602_20230323.html)|
22+
|Intel® Arc™ A-Series Graphics|Windows 11 or Windows 10 21H2 (via WSL2)|[for Windows 11 or Windows 10 21H2](https://www.intel.com/content/www/us/en/download/726609/intel-arc-iris-xe-graphics-whql-windows.html)|
23+
|CPU (3<sup>rd</sup> and 4<sup>th</sup> Gen of Intel® Xeon® Scalable Processors)|Linux\* distributions with glibc>=2.17. Validated on RHEL 8.|N/A|
24+
25+
- Intel® oneAPI Base Toolkit 2023.1
26+
- [DPC++ Compiler hotfix](https://registrationcenter-download.intel.com/akdlm/IRC_NAS/89283df8-c667-47b0-b7e1-c4573e37bd3e/2023.1-linux-hotfix.zip)
2627
- Python 3.7-3.10
2728
- Verified with GNU GCC 11
2829

@@ -32,26 +33,35 @@ Verified Hardware Platforms:
3233

3334
|OS|Instructions for installing Intel GPU Driver|
3435
|-|-|
35-
|Linux\*|Refer to the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html) for the latest driver installation for individual Linux\* distributions. When installing the verified [Stable 540](https://dgpu-docs.intel.com/releases/stable_540_20221205.html) driver, use a specific version for component package names, such as `sudo apt-get install intel-opencl-icd=22.43.24595.35`|
36-
|Windows 11 or Windows 10 21H2 (via WSL2)|Please download drivers for Intel® Arc™ A-Series [for Windows 11 or Windows 10 21H2](https://www.intel.com/content/www/us/en/download/726609/intel-arc-graphics-windows-dch-driver.html). Please note that you would have to follow the rest of the steps in WSL2, but the drivers should be installed on Windows|
36+
|Linux\*|Refer to the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/index.html) for the driver installation on individual Linux\* distributions. When installing the verified driver mentioned in the table above, use the specific version of each component packages mentioned in the installation guide page, such as `sudo apt-get install intel-opencl-icd=<version>`|
37+
|Windows 11 or Windows 10 21H2 (via WSL2)|Please download drivers for Intel® Arc™ A-Series from the web page mentioned in the table above. Please note that you would have to follow the rest of the steps in WSL2, but the drivers should be installed on Windows. Besides that, please follow Steps 4 & 5 of the [Installation Guides](https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-jammy-arc.html#step-4-install-run-time-packages) on WSL2 Ubuntu 22.04.|
3738

3839
### Install oneAPI Base Toolkit
3940

40-
Please refer to [Install oneAPI Base Toolkit Packages](https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#base-kit).
41+
Please refer to [Install oneAPI Base Toolkit Packages](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html).
4142

4243
Need to install components of Intel® oneAPI Base Toolkit:
4344
- Intel® oneAPI DPC++ Compiler (`DPCPPROOT` as its installation path)
4445
- Intel® oneAPI Math Kernel Library (oneMKL) (`MKLROOT` as its installation path)
4546

4647
Default installation location *{ONEAPI_ROOT}* is `/opt/intel/oneapi` for root account, `${HOME}/intel/oneapi` for other accounts. Generally, `DPCPPROOT` is `{ONEAPI_ROOT}/compiler/latest`, `MKLROOT` is `{ONEAPI_ROOT}/mkl/latest`.
4748

48-
**_NOTE:_** You need to activate oneAPI environment when using Intel® Extension for PyTorch\* on Intel GPU.
49+
A DPC++ compiler patch is required to use with oneAPI Basekit 2023.1.0. Use the command below to download the patch package.
50+
51+
```bash
52+
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/89283df8-c667-47b0-b7e1-c4573e37bd3e/2023.1-linux-hotfix.zip
53+
```
54+
55+
You can either follow instructions in the `README.txt` of the patch package, or use the commands below to install the patch.
4956

5057
```bash
58+
unzip 2023.1-linux-hotfix.zip
59+
cd 2023.1-linux-hotfix
5160
source {ONEAPI_ROOT}/setvars.sh
61+
bash installpatch.sh
5262
```
5363

54-
**_NOTE:_** You need to activate ONLY DPC++ compiler and oneMKL environment when compiling Intel® Extension for PyTorch\* from source on Intel GPU.
64+
If later on you are not using the environment of the patch installation, you need to activate ONLY DPC++ compiler and oneMKL environment later on when no matter **_compiling_** or **_using_** Intel® Extension for PyTorch\* on Intel GPUs.
5565

5666
```bash
5767
source {DPCPPROOT}/env/vars.sh
@@ -64,7 +74,7 @@ Intel® Extension for PyTorch\* has to work with a corresponding version of PyTo
6474

6575
|PyTorch Version|Extension Version|
6676
|--|--|
67-
|[v1.13.\*](https://github.com/pytorch/pytorch/tree/v1.13.0) (patches needed)|[v1.13.\*](https://github.com/intel/intel-extension-for-pytorch/tree/v1.13.10+xpu)|
77+
|[v1.13.\*](https://github.com/pytorch/pytorch/tree/v1.13.1) (patches needed)|[v1.13.\*](https://github.com/intel/intel-extension-for-pytorch/tree/v1.13.120+xpu)|
6878
|[v1.10.\*](https://github.com/pytorch/pytorch/tree/v1.10.0) (patches needed)|[v1.10.\*](https://github.com/intel/intel-extension-for-pytorch/tree/v1.10.200+gpu)|
6979

7080
## Install via wheel files
@@ -73,6 +83,7 @@ Prebuilt wheel files availability matrix for Python versions:
7383

7484
| Extension Version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10 |
7585
| :--: | :--: | :--: | :--: | :--: | :--: |
86+
| 1.13.120+xpu | | ✔️ | ✔️ | ✔️ | ✔️ |
7687
| 1.13.10+xpu | | ✔️ | ✔️ | ✔️ | ✔️ |
7788
| 1.10.200+gpu | ✔️ | ✔️ | ✔️ | ✔️ | |
7889

@@ -82,16 +93,14 @@ Prebuilt wheel files for generic Python\* and Intel® Distribution for Python\*
8293

8394
```bash
8495
# General Python*
85-
python -m pip install torch==1.13.0a0 torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.10+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
96+
python -m pip install torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
8697

8798
# Intel® Distribution for Python*
88-
python -m pip install torch==1.13.0a0 torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.10+xpu -f https://developer.intel.com/ipex-whl-stable-xpu-idp
99+
python -m pip install torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu-idp
89100
```
90101

91102
**Note:** Wheel files for Intel® Distribution for Python\* only supports Python 3.9. The support starts from 1.13.10+xpu.
92103

93-
**Note:** Please install Numpy 1.22.3 under Intel® Distribution for Python\*.
94-
95104
**Note:** Installation of TorchVision is optional.
96105

97106
**Note:** You may need to have gomp package in your system (`apt install libgomp1` or `yum/dnf install libgomp`).
@@ -111,7 +120,7 @@ Please refer to [AOT documentation](./AOT.md) for how to configure `USE_AOT_DEVL
111120
To ensure a smooth compilation of the bundle, including PyTorch\*, torchvision, torchaudio, Intel® Extension for PyTorch\*, a script is provided in the Github repo. If you would like to compile the binaries from source, it is highly recommended to utilize this script.
112121

113122
```bash
114-
$ wget https://github.com/intel/intel-extension-for-pytorch/blob/xpu-master/scripts/compile_bundle.sh
123+
$ wget https://raw.githubusercontent.com/intel/intel-extension-for-pytorch/v1.13.120+xpu/scripts/compile_bundle.sh
115124
$ bash compile_bundle.sh <DPCPPROOT> <MKLROOT> [AOT]
116125
DPCPPROOT and MKLROOT are mandatory, should be absolute or relative path to the root directory of DPC++ compiler and oneMKL respectively.
117126
AOT is optional, should be the text string for environment variable USE_AOT_DEVLIST.

0 commit comments

Comments
 (0)