Skip to content

Commit ba5efc1

Browse files
bingyanghuangczhu15
authored andcommitted
[Cherry-pick] update mkldnn int8v2 doc (PaddlePaddle#18177)
test=release/1.5
1 parent 4a20539 commit ba5efc1

File tree

1 file changed

+8
-7
lines changed
  • python/paddle/fluid/contrib/int8_inference

1 file changed

+8
-7
lines changed

python/paddle/fluid/contrib/int8_inference/README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PaddlePaddle supports offline INT8 calibration to accelerate the inference speed
66
You need to install at least PaddlePaddle-1.3 python package `pip install paddlepaddle==1.3`.
77

88
## 1. How to generate INT8 model
9-
You can refer to the unit test in [test_calibration.py](../tests/test_calibration.py). Basically, there are three steps:
9+
You can refer to the unit test in [test_calibration_resnet50.py](../tests/test_calibration_resnet50.py). Basically, there are three steps:
1010
* Construct calibration object.
1111

1212
```python
@@ -68,18 +68,19 @@ Notes:
6868
* The INT8 theoretical speedup is 4X on Intel® Xeon® Cascadelake Server (please refer to `The theoretical peak compute gains are 4x int8 OPS over fp32 OPS.` in [Reference](https://software.intel.com/en-us/articles/lower-numerical-precision-deep-learning-inference-and-training "Reference")). Therefore, op-level gain is 4X and topology-level is smaller.
6969

7070
## 4. How to reproduce the results
71-
* Small dataset (Single core)
71+
* Small dataset for ResNet-50 (Single core)
7272
```bash
73-
FLAGS_use_mkldnn=true python python/paddle/fluid/contrib/tests/test_calibration.py
73+
FLAGS_use_mkldnn=true python python/paddle/fluid/contrib/tests/test_calibration_resnet50.py
7474
```
75+
>Note: Change `test_calibration_resnet50.py` to `test_calibration_mobilenetv1.py` for MobileNet-V1. Same for the following commands.
7576
76-
* Full dataset (Single core)
77+
* Full dataset for ResNet-50 (Single core)
7778
```bash
78-
FLAGS_use_mkldnn=true DATASET=full python python/paddle/fluid/contrib/tests/test_calibration.py
79+
FLAGS_use_mkldnn=true DATASET=full python python/paddle/fluid/contrib/tests/test_calibration_resnet50.py
7980
```
8081

81-
* Full dataset (Multi-core)
82+
* Full dataset for ResNet-50 (Multi-core)
8283
```bash
83-
FLAGS_use_mkldnn=true OMP_NUM_THREADS=20 DATASET=full python python/paddle/fluid/contrib/tests/test_calibration.py
84+
FLAGS_use_mkldnn=true OMP_NUM_THREADS=20 DATASET=full python python/paddle/fluid/contrib/tests/test_calibration_resnet50.py
8485
```
8586
> Notes: This is an example command with 20 cores by using set `OMP_NUM_THREADS` value.

0 commit comments

Comments
 (0)