Skip to content

Commit 50eb6fb

Browse files
authored
update 3x torch installation (#1957)
Signed-off-by: chensuyue <[email protected]>
1 parent 6e1b1da commit 50eb6fb

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

.azure-pipelines/scripts/install_nc.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
echo -e "\n Install Neural Compressor ... "
44
cd /neural-compressor
55
if [[ $1 = *"3x_pt"* ]]; then
6+
if [[ $1 != *"3x_pt_fp8"* ]]; then
7+
echo -e "\n Install torch CPU ... "
8+
pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/cpu
9+
fi
610
python -m pip install --no-cache-dir -r requirements_pt.txt
711
python setup.py pt bdist_wheel
812
pip install --no-deps dist/neural_compressor*.whl --force-reinstall

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,29 @@ support AMD CPU, ARM CPU, and NVidia GPU through ONNX Runtime with limited testi
3131
* [2024/07] Performance optimizations and usability improvements on [client-side](https://github.com/intel/neural-compressor/blob/master/docs/source/3x/client_quant.md).
3232

3333
## Installation
34+
### Install Framework
35+
#### Install torch for CPU
36+
```Shell
37+
pip install torch --index-url https://download.pytorch.org/whl/cpu
38+
```
39+
#### Use Docker Image with torch installed for HPU
40+
https://docs.habana.ai/en/latest/Installation_Guide/Bare_Metal_Fresh_OS.html#bare-metal-fresh-os-single-click
41+
42+
#### Install torch/intel_extension_for_pytorch for Intel GPU
43+
https://intel.github.io/intel-extension-for-pytorch/index.html#installation
44+
45+
#### Install torch for other platform
46+
https://pytorch.org/get-started/locally
47+
48+
#### Install tensorflow
49+
```Shell
50+
pip install tensorflow
51+
```
3452

3553
### Install from pypi
3654
```Shell
3755
# Install 2.X API + Framework extension API + PyTorch dependency
38-
pip install neural-compressor[pt]
56+
pip install neural-compressor[pt]
3957
# Install 2.X API + Framework extension API + TensorFlow dependency
4058
pip install neural-compressor[tf]
4159
```

docs/source/installation_guide.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ The following prerequisites and requirements must be satisfied for a successful
2727
> Notes:
2828
> - If you get some build issues, please check [frequently asked questions](faq.md) at first.
2929
30+
### Install Framework
31+
#### Install torch for CPU
32+
```Shell
33+
pip install torch --index-url https://download.pytorch.org/whl/cpu
34+
```
35+
#### Use Docker Image with torch installed for HPU
36+
https://docs.habana.ai/en/latest/Installation_Guide/Bare_Metal_Fresh_OS.html#bare-metal-fresh-os-single-click
37+
38+
#### Install torch/intel_extension_for_pytorch for Intel GPU
39+
https://intel.github.io/intel-extension-for-pytorch/index.html#installation
40+
41+
#### Install torch for other platform
42+
https://pytorch.org/get-started/locally
43+
44+
#### Install tensorflow
45+
```Shell
46+
pip install tensorflow
47+
```
48+
3049
### Install from Binary
3150
- Install from Pypi
3251
```Shell

requirements_pt.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ prettytable
55
psutil
66
py-cpuinfo
77
pydantic
8-
torch

0 commit comments

Comments
 (0)