@@ -34,17 +34,23 @@ Intel® Extension for PyTorch\* has to work with a corresponding version of PyTo
34
34
35
35
### Install oneAPI Base Toolkit
36
36
37
- Please refer to [ Install oneAPI Base Toolkit Packages] ( https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#base-kit )
37
+ Please refer to [ Install oneAPI Base Toolkit Packages] ( https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#base-kit ) .
38
38
39
39
Need to install components of Intel® oneAPI Base Toolkit:
40
40
- Intel® oneAPI DPC++ Compiler
41
41
- Intel® oneAPI Math Kernel Library (oneMKL)
42
42
43
- Default installation location is /opt/intel/oneapi for root account, ${HOME}/intel/oneapi for other accounts.
43
+ Default installation location * {ONEAPI_ROOT}* is ` /opt/intel/oneapi ` for root account, ` ${HOME}/intel/oneapi ` for other accounts.
44
+
45
+ ** _ NOTE:_ ** You need to activate oneAPI environment when using Intel® Extension for PyTorch\* on Intel GPU.
46
+
47
+ ``` bash
48
+ source {ONEAPI_ROOT}/setvars.sh
49
+ ```
44
50
45
51
## Install via wheel files
46
52
47
- Prebuilt wheel files availability matrix for Python versions
53
+ Prebuilt wheel files availability matrix for Python versions:
48
54
49
55
| Extension Version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10 |
50
56
| :--: | :--: | :--: | :--: | :--: | :--: |
@@ -56,6 +62,28 @@ Prebuilt wheel files availability matrix for Python versions
56
62
python -m pip install torch==1.10.0a0 -f https://developer.intel.com/ipex-whl-stable-xpu
57
63
```
58
64
65
+ ### Install Numpy
66
+
67
+ Numpy is required to work with PyTorch\* . Verified numpy versions differ according to python versions.
68
+
69
+ ``` bash
70
+ python -m pip install numpy==1.19.5 # for Python 3.6
71
+ python -m pip install numpy==1.21.6 # for Python 3.7
72
+ python -m pip install numpy==1.23.4 # for Python 3.8 and 3.9
73
+ ```
74
+
75
+ ### Install torchvision and torchaudio (Optional)
76
+
77
+ Intel® Extension for PyTorch\* doesn't depend on torchvision or torchaudio.
78
+
79
+ You can install torchvision via the following command.
80
+
81
+ ``` bash
82
+ python -m pip install torchvision==0.11.0+cpu --no-deps -f https://download.pytorch.org/whl/torch_stable.html
83
+ ```
84
+
85
+ For torchaudio installation, please follow the [ instructions] ( https://github.com/pytorch/audio/tree/v0.10.0#from-source ) to compile it from source. According to torchaudio-pytorch dependency table, torchaudio 0.10.0 is recommended.
86
+
59
87
### Install Intel® Extension for PyTorch\*
60
88
61
89
``` bash
@@ -84,7 +112,7 @@ $ git apply ${intel_extension_for_pytorch_directory}/torch_patches/*.patch
84
112
$ git submodule sync
85
113
$ git submodule update --init --recursive
86
114
$ pip install -r requirements.txt
87
- $ source ${oneAPI_HOME} /mkl/latest/env/vars .sh
115
+ $ source {ONEAPI_ROOT}/setvars .sh
88
116
$ python setup.py bdist_wheel
89
117
$ pip install dist/* .whl
90
118
```
@@ -104,8 +132,7 @@ $ cd intel-extension-for-pytorch
104
132
$ git submodule sync
105
133
$ git submodule update --init --recursive
106
134
$ pip install -r requirements.txt
107
- $ source ${oneAPI_HOME} /compiler/latest/env/vars.sh
108
- $ source ${oneAPI_HOME} /mkl/latest/env/vars.sh
135
+ $ source {ONEAPI_ROOT}/setvars.sh # If you have sourced the oneAPI environment when compiling PyTorch, please skip this step.
109
136
$ python setup.py bdist_wheel
110
137
$ pip install dist/* .whl
111
138
```
0 commit comments