From 9e5b04e60dc929e27fee05fa5b03631f0317d2d6 Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Tue, 30 Mar 2021 17:01:31 -0500
Subject: [PATCH] Removed config.h.in to fix config.h collision (vs
 tensor_runtime/include)

---
 .../test/dnn_benchmarks/hpvm-c/CMakeLists.txt | 22 ++++++-------------
 .../alexnet2_cifar10/alexnet2_cifar10.cpp     |  2 +-
 .../alexnet2_cifar10_cudnn.cpp                |  2 +-
 .../alexnet_cifar10/alexnet_cifar10.cpp       |  2 +-
 .../alexnet_cifar10/alexnet_cifar10_cudnn.cpp |  2 +-
 .../alexnet_imagenet/alexnet_imagenet.cpp     |  2 +-
 .../alexnet_imagenet_cudnn.cpp                |  2 +-
 .../benchmarks/lenet_mnist/lenet_mnist.cpp    |  2 +-
 .../lenet_mnist/lenet_mnist_cudnn.cpp         |  2 +-
 .../mobilenet_cifar10/mobilenet_cifar10.cpp   |  2 +-
 .../mobilenet_cifar10_cudnn.cpp               |  2 +-
 .../resnet18_cifar10/resnet18_cifar10.cpp     |  2 +-
 .../resnet18_cifar10_cudnn.cpp                |  2 +-
 .../resnet50_imagenet/resnet50_imagenet.cpp   |  2 +-
 .../resnet50_imagenet_cudnn.cpp               |  2 +-
 .../vgg16_cifar10/vgg16_cifar10.cpp           |  2 +-
 .../vgg16_cifar10/vgg16_cifar10_cudnn.cpp     |  2 +-
 .../vgg16_cifar100/vgg16_cifar100.cpp         |  2 +-
 .../vgg16_cifar100/vgg16_cifar100_cudnn.cpp   |  2 +-
 .../vgg16_imagenet/vgg16_imagenet.cpp         |  2 +-
 .../vgg16_imagenet/vgg16_imagenet_cudnn.cpp   |  2 +-
 .../dnn_benchmarks/hpvm-c/include/config.h.in |  1 -
 22 files changed, 27 insertions(+), 36 deletions(-)
 delete mode 100644 hpvm/test/dnn_benchmarks/hpvm-c/include/config.h.in

diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt b/hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt
index 3a0c6534e0..d163ddf9f7 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt
@@ -1,18 +1,6 @@
 # First get approxhpvm.py which we then use to compile benchmarks.
 get_filename_component(APPROXHPVM_PY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/approxhpvm.py REALPATH)
 
-# Configure config.h which tells the benchmarks where's the model parameter directory.
-# We can also use the one in tensor_runtime, but we're avoiding that so as to 
-# decouple things.
-set(MODEL_PARAMS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../model_params/")
-configure_file(
-  "include/config.h.in"
-  "${CMAKE_CURRENT_BINARY_DIR}/include/config.h"
-)
-# This will be an extra include directory (specific to these benchmarks)
-# and we'll give this to approxhpvm.py
-set(CONFIG_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
-
 # --[ llvm-lit test setup
 # lit.cfg.py looks for tests in CMAKE_CURRENT_BINARY_DIR (see lit.cfg.py)
 # as most of the tests require some kind of compilation / generation
@@ -37,14 +25,18 @@ add_custom_command(
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/check_dnn_acc.py
 )
 
+# Each source file contains a @MODEL_PARAMS_DIR@ waiting to be filled in.
+set(MODEL_PARAMS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../model_params/")
 set(test_compile_targets "")
 function(compile_hpvm_c bin_filename src_filepath codegen_target)
+  set(generated_file_path "${CMAKE_CURRENT_BINARY_DIR}/${bin_filename}.cpp")
+  configure_file(${src_filepath} ${generated_file_path})
   add_custom_command(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${bin_filename}
-    DEPENDS ${src_filepath} approxhpvm.py
+    DEPENDS ${generated_file_path} approxhpvm.py
     COMMAND ${APPROXHPVM_PY}
-      ${src_filepath} ${CMAKE_CURRENT_BINARY_DIR}/${bin_filename}
-      -t ${codegen_target} -I ${CONFIG_INCLUDE_DIR} ${ARGV}
+      ${generated_file_path} ${CMAKE_CURRENT_BINARY_DIR}/${bin_filename}
+      -t ${codegen_target} -I ${CMAKE_CURRENT_SOURCE_DIR}/include ${ARGN}
   )
   add_custom_target(${bin_filename} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${bin_filename})
   set(test_compile_targets ${test_compile_targets} ${bin_filename} PARENT_SCOPE)
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10.cpp
index 860e3b6423..39f49784d7 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10.cpp
@@ -429,7 +429,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet2_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/alexnet2_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10_cudnn.cpp
index f44e19dece..dafd1a6ae0 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet2_cifar10/alexnet2_cifar10_cudnn.cpp
@@ -434,7 +434,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet2_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/alexnet2_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10.cpp
index 6d8973ad98..64350c590b 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10.cpp
@@ -380,7 +380,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/alexnet_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   uint8_t *labels = readLabels(labels_path.c_str(), 5000);
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10_cudnn.cpp
index b2a940d501..72af2ff4a1 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_cifar10/alexnet_cifar10_cudnn.cpp
@@ -386,7 +386,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/alexnet_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   uint32_t *labels = readLabels3(labels_path.c_str(), 5000);
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp
index 474ab64cad..37e7a34a51 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp
@@ -478,7 +478,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet_imagenet/";
+  std::string dir_prefix = 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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet_cudnn.cpp
index 10e95202f2..1206d7bac4 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/alexnet_imagenet/alexnet_imagenet_cudnn.cpp
@@ -483,7 +483,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet_imagenet/";
+  std::string dir_prefix = 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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist.cpp
index 5c42f6953c..d7ab4238eb 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist.cpp
@@ -282,7 +282,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/lenet_mnist/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/lenet_mnist/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist_cudnn.cpp
index 0c2568f81b..26acc65a99 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/lenet_mnist/lenet_mnist_cudnn.cpp
@@ -287,7 +287,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/lenet_mnist/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/lenet_mnist/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10.cpp
index 01d0273416..5f8c63dbfb 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10.cpp
@@ -1984,7 +1984,7 @@ int main(int argc, char *argv[]) {
   }
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/mobilenet_cifar10/";
+      std::string("@MODEL_PARAMS_DIR@") + "/mobilenet_cifar10/";
 
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10_cudnn.cpp
index e51e85dd98..2070089053 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/mobilenet_cifar10/mobilenet_cifar10_cudnn.cpp
@@ -1989,7 +1989,7 @@ int main(int argc, char *argv[]) {
   }
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/mobilenet_cifar10/";
+      std::string("@MODEL_PARAMS_DIR@") + "/mobilenet_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10.cpp
index fa83c534d0..5b580f2682 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10.cpp
@@ -1318,7 +1318,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/resnet18_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/resnet18_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10_cudnn.cpp
index c7b789c234..735e2c9aba 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet18_cifar10/resnet18_cifar10_cudnn.cpp
@@ -1249,7 +1249,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/resnet18_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/resnet18_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   uint32_t *labels = readLabels3(labels_path.c_str(), 5000);
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp
index 91d07e3046..160563064c 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp
@@ -5151,7 +5151,7 @@ int main(int argc, char *argv[]) {
   }
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/resnet50_imagenet/";
+      std::string("@MODEL_PARAMS_DIR@") + "/resnet50_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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet_cudnn.cpp
index 932580e03e..c5cf2cb3a0 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/resnet50_imagenet/resnet50_imagenet_cudnn.cpp
@@ -4927,7 +4927,7 @@ int main(int argc, char *argv[]) {
   }
 
   std::string dir_prefix =
-      std::string(MODEL_PARAMS_DIR) + "/resnet50_imagenet/";
+      std::string("@MODEL_PARAMS_DIR@") + "/resnet50_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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp
index 195c676c11..bec6139c2d 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp
@@ -845,7 +845,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/vgg16_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10_cudnn.cpp
index c304237ea5..4fa7d5c121 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar10/vgg16_cifar10_cudnn.cpp
@@ -850,7 +850,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar10/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/vgg16_cifar10/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp
index 4cd5c13429..8666030fba 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp
@@ -845,7 +845,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar100/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/vgg16_cifar100/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100_cudnn.cpp
index 532fca6b85..6d01caa3b7 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_cifar100/vgg16_cifar100_cudnn.cpp
@@ -850,7 +850,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_cifar100/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/vgg16_cifar100/";
   std::string input_path = dir_prefix + std::string("test_input.bin");
   std::string labels_path = dir_prefix + std::string("test_labels.bin");
   std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp
index 8e299f40e6..b1b2b4f2e3 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp
@@ -893,7 +893,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_imagenet/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/vgg16_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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet_cudnn.cpp b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet_cudnn.cpp
index 930a33e43c..eb29e45805 100644
--- a/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet_cudnn.cpp
+++ b/hpvm/test/dnn_benchmarks/hpvm-c/benchmarks/vgg16_imagenet/vgg16_imagenet_cudnn.cpp
@@ -898,7 +898,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
-  std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/vgg16_imagenet/";
+  std::string dir_prefix = std::string("@MODEL_PARAMS_DIR@") + "/vgg16_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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin");
diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/include/config.h.in b/hpvm/test/dnn_benchmarks/hpvm-c/include/config.h.in
deleted file mode 100644
index 0eb8f3f24d..0000000000
--- a/hpvm/test/dnn_benchmarks/hpvm-c/include/config.h.in
+++ /dev/null
@@ -1 +0,0 @@
-#define MODEL_PARAMS_DIR "@MODEL_PARAMS_DIR@"
-- 
GitLab