Skip to content

Commit e06371c

Browse files
committed
Merge remote-tracking branch 'gitlab/master-pt1.8'
2 parents 82e3086 + 5e65aa0 commit e06371c

File tree

3 files changed

+7
-44
lines changed

3 files changed

+7
-44
lines changed

README.md

+5-43
Original file line numberDiff line numberDiff line change
@@ -27,57 +27,19 @@ Intel Extension for PyTorch is a Python package to extend official PyTorch. It i
2727
|[v1.0.1](https://github.com/intel/intel-extension-for-pytorch/tree/v1.0.1)|[v1.5.0-rc3](https://github.com/pytorch/pytorch/tree/v1.5.0-rc3 "v1.5.0-rc3")|
2828
|[v1.0.0](https://github.com/intel/intel-extension-for-pytorch/tree/v1.0.0)|[v1.5.0-rc3](https://github.com/pytorch/pytorch/tree/v1.5.0-rc3 "v1.5.0-rc3")|
2929

30-
Take Intel-Extension-for-Pytorch v1.8.0 as the example.
31-
32-
1. Install PyTorch from binary
33-
```bash
34-
conda install pytorch torchvision torchaudio cpuonly -c pytorch
35-
```
36-
37-
2. Install PyTorch from source
38-
39-
Get PyTorch v1.8.0 source(Refer to [PyTorch guide](https://github.com/pytorch/pytorch#get-the-pytorch-source) for more details)
40-
```bash
41-
git clone --recursive https://github.com/pytorch/pytorch
42-
```
43-
44-
Checkout PyTorch to the specified version
45-
```bash
46-
cd pytorch
47-
git checkout v1.8.0
48-
```
49-
50-
Update submodules
51-
```bash
52-
git submodule sync
53-
git submodule update --init --recursive
54-
```
55-
56-
Build and install PyTorch (Refer to [PyTorch guide](https://github.com/pytorch/pytorch#install-pytorch) for more details)
57-
```bash
58-
python setup.py install
59-
```
60-
61-
### Install Intel Extension for PyTorch from Source
62-
63-
Get the source code of Intel Extension for PyTorch
30+
For IPEX version earlier than 1.8.0, a patch has to be manually applied to PyTorch source code. Please check previous installation guide.
31+
32+
From IPEX 1.8.0, compiling PyTorch from source is not required. If you still want to compile PyTorch, please follow instructions [here](https://github.com/pytorch/pytorch#installation). Please make sure to checkout the correct PyTorch version according to the table above.
33+
6434
```bash
6535
git clone --recursive https://github.com/intel/intel-extension-for-pytorch
6636
cd intel-extension-for-pytorch
6737

6838
# if you are updating an existing checkout
6939
git submodule sync
7040
git submodule update --init --recursive
71-
```
7241

73-
Install dependencies
74-
```bash
75-
pip install lark-parser hypothesis
76-
```
77-
78-
Install the extension
79-
```bash
80-
cd ${intel_extension_for_pytorch_directory}
42+
# run setup.py to compile IPEX and install the binaries
8143
python setup.py install
8244
```
8345

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ def build_extension(self, ext):
310310
'-DPYTHON_INCLUDE_DIR=' + python_include_dir,
311311
'-DPYTORCH_INCLUDE_DIRS=' + pytorch_install_dir + "/include",
312312
'-DPYTORCH_LIBRARY_DIRS=' + pytorch_install_dir + "/lib",
313+
'-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=' + str(int(torch._C._GLIBCXX_USE_CXX11_ABI)),
313314
]
314315

315316
if _check_env_flag("IPEX_DISP_OP"):

0 commit comments

Comments
 (0)