From f5f28ad3be2b7b238dcb2d41df6cbf90f1eb58bc Mon Sep 17 00:00:00 2001
From: Akash Kothari <akashk4@tyler.cs.illinois.edu>
Date: Mon, 25 Jan 2021 04:06:52 -0600
Subject: [PATCH] Fix the paths to weights, inputs and labels in DNN benchmarks

---
 .../benchmarks/alexnet/alexnet_loop.cpp        |  2 +-
 .../benchmarks/alexnet2/alexnet2.cpp           |  2 +-
 .../benchmarks/alexnet2/alexnet2_loop.cpp      |  2 +-
 .../alexnet_imagenet/alexnet_imagenet.cpp      |  6 +++---
 .../alexnet_imagenet/alexnet_imagenet_loop.cpp |  6 +++---
 .../benchmarks/lenet_mnist/lenet_mnist.cpp     | 18 +++++++++---------
 .../lenet_mnist/lenet_mnist_loop.cpp           | 18 +++++++++---------
 .../benchmarks/resnet18/resnet18.cpp           |  2 +-
 .../benchmarks/resnet18/resnet18_loop.cpp      |  2 +-
 .../benchmarks/vgg16_cifar10/vgg16_cifar10.cpp |  2 +-
 .../vgg16_cifar10/vgg16_cifar10_loop.cpp       |  2 +-
 .../vgg16_cifar100/vgg16_cifar100.cpp          |  2 +-
 .../vgg16_cifar100/vgg16_cifar100_loop.cpp     |  2 +-
 .../vgg16_imagenet/vgg16_imagenet_loop.cpp     |  2 +-
 14 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp
index 726abe4f2e..86b3e7eb93 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp
@@ -368,7 +368,7 @@ int main() {
 
   std::string input_path = dir_prefix + std::string("input.bin");
   // void* input = readTrainedWeights(input_path.c_str(), 0,5000,3,32,32);
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   uint8_t *labels = readLabels(labels_path.c_str(), 5000);
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp
index 2aad203263..bc1f9fa18e 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp
@@ -415,7 +415,7 @@ int main() {
 
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet2_cifar10/";
 
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 32, 3, 3, 3);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp
index 811edbd494..59161a118d 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp
@@ -415,7 +415,7 @@ int main() {
 
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet2_cifar10/";
 
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 32, 3, 3, 3);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp
index 0d50f566f9..466e311577 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp
@@ -463,9 +463,9 @@ typedef struct __attribute__((__packed__)) {
 int main() {
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/alexnet_imagenet_tune/";
-  std::string input_path = dir_prefix + std::string("test_input.bin");
-  std::string labels_path = dir_prefix + std::string("test_labels.bin");
+      std::string(MODEL_PARAMS_DIR) + "/alexnet_imagenet/";
+  std::string input_path = dir_prefix + std::string("input.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 11, 11);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet_loop.cpp
index c8d5d2437e..340e0aa119 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet_loop.cpp
@@ -463,10 +463,10 @@ typedef struct __attribute__((__packed__)) {
 int main() {
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/alexnet_imagenet_tune/";
+      std::string(MODEL_PARAMS_DIR) + "/alexnet_imagenet/";
 
-  std::string input_path = dir_prefix + std::string("test_input.bin");
-  std::string labels_path = dir_prefix + std::string("test_labels.bin");
+  std::string input_path = dir_prefix + std::string("input.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 11, 11);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp b/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp
index f24be84b31..3613e9f132 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp
@@ -269,30 +269,30 @@ int main() {
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/lenet_mnist/";
 
   std::string input_path = dir_prefix + std::string("input.bin");
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
 
-  std::string conv2d_1_w_path = dir_prefix + std::string("conv1.bin");
+  std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 32, 1, 5, 5);
-  std::string conv2d_1_b_path = dir_prefix + std::string("conv1_bias.bin");
+  std::string conv2d_1_b_path = dir_prefix + std::string("conv2d_1_b.bin");
   void *conv2d_1_b =
       readTrainedWeights(conv2d_1_b_path.c_str(), 0, 1, 32, 1, 1);
-  std::string conv2d_2_w_path = dir_prefix + std::string("conv2.bin");
+  std::string conv2d_2_w_path = dir_prefix + std::string("conv2d_2_w.bin");
   void *conv2d_2_w =
       readTrainedWeights(conv2d_2_w_path.c_str(), 0, 64, 32, 5, 5);
-  std::string conv2d_2_b_path = dir_prefix + std::string("conv2_bias.bin");
+  std::string conv2d_2_b_path = dir_prefix + std::string("conv2d_2_b.bin");
   void *conv2d_2_b =
       readTrainedWeights(conv2d_2_b_path.c_str(), 0, 1, 64, 1, 1);
-  std::string dense_1_w_path = dir_prefix + std::string("fc1.bin");
+  std::string dense_1_w_path = dir_prefix + std::string("dense_1_w.bin");
   void *dense_1_w =
       readTrainedWeights(dense_1_w_path.c_str(), 0, 1, 1, 3136, 1024);
-  std::string dense_1_b_path = dir_prefix + std::string("fc1_bias.bin");
+  std::string dense_1_b_path = dir_prefix + std::string("dense_1_b.bin");
   void *dense_1_b =
       readTrainedWeights(dense_1_b_path.c_str(), 0, 1, 1024, 1, 1);
-  std::string dense_2_w_path = dir_prefix + std::string("fc2.bin");
+  std::string dense_2_w_path = dir_prefix + std::string("dense_2_w.bin");
   void *dense_2_w =
       readTrainedWeights(dense_2_w_path.c_str(), 0, 1, 1, 1024, 10);
-  std::string dense_2_b_path = dir_prefix + std::string("fc2_bias.bin");
+  std::string dense_2_b_path = dir_prefix + std::string("dense_2_b.bin");
   void *dense_2_b = readTrainedWeights(dense_2_b_path.c_str(), 0, 1, 10, 1, 1);
   void *input = readTrainedWeights(input_path.c_str(), 0, 5000, 1, 28, 28);
 
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist_loop.cpp
index a4dc5eb9c2..9a8bfbc68f 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist_loop.cpp
@@ -269,30 +269,30 @@ int main() {
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/lenet_mnist/";
 
   std::string input_path = dir_prefix + std::string("input.bin");
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
 
-  std::string conv2d_1_w_path = dir_prefix + std::string("conv1.bin");
+  std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 32, 1, 5, 5);
-  std::string conv2d_1_b_path = dir_prefix + std::string("conv1_bias.bin");
+  std::string conv2d_1_b_path = dir_prefix + std::string("conv2d_1_b.bin");
   void *conv2d_1_b =
       readTrainedWeights(conv2d_1_b_path.c_str(), 0, 1, 32, 1, 1);
-  std::string conv2d_2_w_path = dir_prefix + std::string("conv2.bin");
+  std::string conv2d_2_w_path = dir_prefix + std::string("conv2d_2_w.bin");
   void *conv2d_2_w =
       readTrainedWeights(conv2d_2_w_path.c_str(), 0, 64, 32, 5, 5);
-  std::string conv2d_2_b_path = dir_prefix + std::string("conv2_bias.bin");
+  std::string conv2d_2_b_path = dir_prefix + std::string("conv2d_2_b.bin");
   void *conv2d_2_b =
       readTrainedWeights(conv2d_2_b_path.c_str(), 0, 1, 64, 1, 1);
-  std::string dense_1_w_path = dir_prefix + std::string("fc1.bin");
+  std::string dense_1_w_path = dir_prefix + std::string("dense_1_w.bin");
   void *dense_1_w =
       readTrainedWeights(dense_1_w_path.c_str(), 0, 1, 1, 3136, 1024);
-  std::string dense_1_b_path = dir_prefix + std::string("fc1_bias.bin");
+  std::string dense_1_b_path = dir_prefix + std::string("dense_1_b.bin");
   void *dense_1_b =
       readTrainedWeights(dense_1_b_path.c_str(), 0, 1, 1024, 1, 1);
-  std::string dense_2_w_path = dir_prefix + std::string("fc2.bin");
+  std::string dense_2_w_path = dir_prefix + std::string("dense_2_w.bin");
   void *dense_2_w =
       readTrainedWeights(dense_2_w_path.c_str(), 0, 1, 1, 1024, 10);
-  std::string dense_2_b_path = dir_prefix + std::string("fc2_bias.bin");
+  std::string dense_2_b_path = dir_prefix + std::string("dense_2_b.bin");
   void *dense_2_b = readTrainedWeights(dense_2_b_path.c_str(), 0, 1, 10, 1, 1);
   //  void* input = readTrainedWeights(input_path.c_str(), 0, 5000,1,28,28);
 
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp
index 9941ac9771..d9f96cfdac 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp
@@ -1232,7 +1232,7 @@ int main() {
 
   std::string input_path = dir_prefix + std::string("input.bin");
   void *input = readTrainedWeights(input_path.c_str(), 0, 5000, 3, 32, 32);
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   uint32_t *labels = readLabels3(labels_path.c_str(), 5000);
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp
index a0e62d3b58..6bf5a58135 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp
@@ -1305,7 +1305,7 @@ int main() {
 
   std::string input_path = dir_prefix + std::string("input.bin");
   // void* input = readTrainedWeights(input_path.c_str(), 0,5000,3,32,32);
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   // uint32_t* labels = readLabels3(labels_path.c_str(),5000);
 
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp
index 78b762a210..f1533c75b4 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp
@@ -831,7 +831,7 @@ int main() {
 
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar10/";
   std::string input_path = dir_prefix + std::string("input.bin");
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 3, 3);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10_loop.cpp
index 11b67b1e5c..059bff6d22 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10_loop.cpp
@@ -831,7 +831,7 @@ int main() {
 
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar10/";
   std::string input_path = dir_prefix + std::string("input.bin");
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 3, 3);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp
index f931cc76b4..41fe9ae0f3 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp
@@ -832,7 +832,7 @@ int main() {
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar100/";
 
   std::string input_path = dir_prefix + std::string("input.bin");
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 3, 3);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100_loop.cpp
index 3f2175a7f4..3a853d3a0f 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100_loop.cpp
@@ -832,7 +832,7 @@ int main() {
   std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar100/";
 
   std::string input_path = dir_prefix + std::string("input.bin");
-  std::string labels_path = dir_prefix + std::string("labels32.bin");
+  std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
   void *conv2d_1_w =
       readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 3, 3);
diff --git a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet_loop.cpp
index 18eb7a58db..2bd129300a 100644
--- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet_loop.cpp
+++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet_loop.cpp
@@ -878,7 +878,7 @@ typedef struct __attribute__((__packed__)) {
 int main() {
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/vgg16_imagenet_tune/";
+      std::string(MODEL_PARAMS_DIR) + "/vgg16_imagenet/";
   std::string input_path = dir_prefix + std::string("input.bin");
   std::string labels_path = dir_prefix + std::string("labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
-- 
GitLab