From 92d96214ad5baf4963b360ef40856c7cea94fb0b Mon Sep 17 00:00:00 2001
From: Peter Pao-Huang <ytp2@miranda.cs.illinois.edu>
Date: Thu, 8 Jul 2021 00:42:24 -0500
Subject: [PATCH] Added calibration scales for various quantization strategies
 using distiller

---
 .../miniera-hpvm/data/calib_AVG.txt           | 23 +++++++++++++++++++
 .../miniera-hpvm/data/calib_GAUSS.txt         | 21 +++++++++++++++++
 .../miniera-hpvm/data/calib_LAPLACE.txt       | 21 +++++++++++++++++
 .../miniera-hpvm/data/calib_NONE.txt          | 22 ++++++++++++++++++
 .../miniera-hpvm/data/calib_N_STD.txt         | 22 ++++++++++++++++++
 5 files changed, 109 insertions(+)
 create mode 100644 hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_AVG.txt
 create mode 100644 hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_GAUSS.txt
 create mode 100644 hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_LAPLACE.txt
 create mode 100644 hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_NONE.txt
 create mode 100644 hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_N_STD.txt

diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_AVG.txt b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_AVG.txt
new file mode 100644
index 0000000000..0d8f856819
--- /dev/null
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_AVG.txt
@@ -0,0 +1,23 @@
+nput:  0.007874017625343142
+conv1:  0.023654410847764974
+add1:   0.023654410847764974
+relu1:  0.021619032507390144
+conv2:  0.07200678634515169
+add2:   0.07200678634515169
+relu2:  0.03490343583359408
+pool1:  0.03490287584843457
+conv3:  0.12003916988598651
+add3:   0.12003916988598651
+relu3:  0.04313369208420633
+conv4:  0.0996546222090056
+add4:   0.0996546222090056
+relu4:  0.04372097987938304
+pool2:  0.04374781589683323
+gemm1:  0.10430887274404269
+add5:   0.10430887274404269
+relu5:  0.042984259759753236
+gemm2:  0.10546852643940023
+add6:   0.10546852643940023
+softmax1:       0.007605097513419976
+
+
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_GAUSS.txt b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_GAUSS.txt
new file mode 100644
index 0000000000..19626ecdce
--- /dev/null
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_GAUSS.txt
@@ -0,0 +1,21 @@
+input:  0.007874017625343142
+conv1:  0.021404776652802576
+add1:   0.021404776652802576
+relu1:  0.021404776652802576
+conv2:  0.04973298382535934
+add2:   0.04973298382535934
+relu2:  0.04973298382535934
+pool1:  0.016315983762439316
+conv3:  0.09741442667659352
+add3:   0.09741442667659352
+relu3:  0.09741442667659352
+conv4:  0.11995213701808131
+add4:   0.11995213701808131
+relu4:  0.11995213701808131
+pool2:  0.028510418096389278
+gemm1:  0.18596565622009148
+add5:   0.18596565622009148
+relu5:  0.18596565622009148
+gemm2:  0.33013358894137357
+add6:   0.33013358894137357
+softmax1:       0.013424164663963166
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_LAPLACE.txt b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_LAPLACE.txt
new file mode 100644
index 0000000000..6aef131d37
--- /dev/null
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_LAPLACE.txt
@@ -0,0 +1,21 @@
+input:  0.007874017625343142
+conv1:  0.03665048430008451
+add1:   0.03665048430008451
+relu1:  0.03665048430008451
+conv2:  0.08338719774431115
+add2:   0.08338719774431115
+relu2:  0.08338719774431115
+pool1:  0.022698952014364872
+conv3:  0.16777389142655952
+add3:   0.16777389142655952
+relu3:  0.16777389142655952
+conv4:  0.2048502523275241
+add4:   0.2048502523275241
+relu4:  0.2048502523275241
+pool2:  0.038877833825527744
+gemm1:  0.3252792107129931
+add5:   0.3252792107129931
+relu5:  0.3252792107129931
+gemm2:  0.5813861520085685
+add6:   0.5813861520085685
+softmax1:       0.02540377321775345
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_NONE.txt b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_NONE.txt
new file mode 100644
index 0000000000..9bffa5b8d0
--- /dev/null
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_NONE.txt
@@ -0,0 +1,22 @@
+nput:	0.007874015748031496 
+conv1:	0.041152522047244094
+add1:	0.041152522047244094
+relu1:	0.03673215196850394
+conv2:	0.18990387401574804
+add2:	0.18990387401574804
+relu2:	0.12851757480314963
+pool1:	0.12851757480314963
+conv3:	0.4379456692913386
+add3:	0.4379456692913386
+relu3:	0.13566622047244095
+conv4:	0.3754296456692913
+add4:	0.3754296456692913
+relu4:	0.15238466141732282
+pool2:	0.15238466141732282
+gemm1:	0.27306629921259845
+add5:	0.27306629921259845
+relu5:	0.20020370078740157
+gemm2:	0.6007037007874017
+add6:	0.6007037007874017
+softmax1:	0.007874015748031496
+
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_N_STD.txt b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_N_STD.txt
new file mode 100644
index 0000000000..9bc517d4cf
--- /dev/null
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/miniera-hpvm/data/calib_N_STD.txt
@@ -0,0 +1,22 @@
+input:  0.007874017625343142
+conv1:  0.012472088810346262
+add1:   0.012472088810346262
+relu1:  0.00429624305554554
+conv2:  0.029664218034899454
+add2:   0.029664218034899454
+relu2:  0.005501268877874114
+pool1:  0.00899828762597462
+conv3:  0.056705218373084315
+add3:   0.056705218373084315
+relu3:  0.009914696484583816
+conv4:  0.07417857865185588
+add4:   0.07417857865185588
+relu4:  0.009264305754885915
+pool2:  0.015657550337354317
+gemm1:  0.11482416531291287
+add5:   0.11482416531291287
+relu5:  0.022678972680880302
+gemm2:  0.16913290866871966
+add6:   0.16913290866871966
+softmax1:       0.007617369452763092
+
-- 
GitLab