1- # Guild to run resnet50 fp32 and int8 models.
1+ # Guide to run resnet50 fp32 and int8 models.
22
33
44
9292
9393 ./run_caffe2.py -m $modelname -p imagenet_folder -v validation_file -b "batchsize" -w 5 --onnx
9494```
95+ If you want to run dummy data, please use the blow command
96+ ```
97+ export PYTHONPATH=/the/path/to/your/pytorch/src
98+ export LD_PRELOAD=the/location/of/libiomp5.so #libiomp5.so can be found under you mkl folder
99+ export OMP_NUM_THREADS=28 KMP_AFFINITY=proclist=[0-27],granularity=thread,explicit #28 is an example, it means cores of one socket of your cpu
100+
101+ ./run_caffe2.py -m $modelname -b "batchsize" -w 5 -u -i 1000 --onnx
102+ ```
95103
96104## Run int8 model
97105
@@ -100,8 +108,19 @@ Note:
100108 export LD_PRELOAD=the/location/of/libiomp5.so #libiomp5.so can be found under you mkl folder
101109 export OMP_NUM_THREADS=28 KMP_AFFINITY=proclist=[0-27],granularity=thread,explicit #28 is an example, it means cores of one socket of your cpu
102110
103- ./run_caffe2.py -m $modelname -p calibration_folder -v validation_file -b "batchsize" -w 5 -int8
111+ ./run_caffe2.py -m $modelname -p imagenet_folder -v validation_file -b "batchsize" -w 5 -int8
104112```
113+ If you want to run dummy data, please use the blow command
114+ ```
115+ export PYTHONPATH=/the/path/to/your/pytorch/src
116+ export LD_PRELOAD=the/location/of/libiomp5.so #libiomp5.so can be found under you mkl folder
117+ export OMP_NUM_THREADS=28 KMP_AFFINITY=proclist=[0-27],granularity=thread,explicit #28 is an example, it means cores of one socket of your cpu
118+
119+ ./run_caffe2.py -m $modelname -b "batchsize" -w 5 -u -i 1000 -int8
120+ ```
121+
122+
123+
105124
106125## Parse the result, the output of both fp32 and int8 model looks like below,
107126
0 commit comments