diff --git a/hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt b/hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt index 3a0c6534e02ce82fdfd02f483f71c6be1a9ab433..d163ddf9f7677ccc79f70f46e20ac04a4dd6fef7 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 860e3b6423bc78d073096a981f765bed10fb73a7..39f49784d76470c4e0bab213127369806e1e2531 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 f44e19dece121cb01a1f3e6a8bf9e27ea945e6ce..dafd1a6ae084c4e1bf819ce1ac94e667c696eb24 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 6d8973ad982b1aa3b206a0cf40ee1888c37e293f..64350c590bb181fa4eaab4b2bf5fb37f69e11c09 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 b2a940d501d8b1c2e29dbe7240012ace8197bbb4..72af2ff4a1b33aabac427d203101c32c4a7403c7 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 474ab64cadf3eac158d39e6e1e6686765c3bac36..37e7a34a51a14b6903d549f271d3c0c83822fec8 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 10e95202f2e2188a9dcd1c12a168a612f897fcf9..1206d7bac4b9dcff2b4cfd7183f4a3e5f65d73d9 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 5c42f6953cfd9256cea73b39868a7ec571f18565..d7ab4238ebac5598b92c432aced85a602bb5ce89 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 0c2568f81b701cb474a257b190be61b4bba45f3e..26acc65a99287ea9f20e037dd996635315d76e48 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 01d027341686291c83e605bdeee1bbcffa68d6e9..5f8c63dbfbfb800dc6f60f9ed9a6108dee0a9a48 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 e51e85dd980dd910389ec4415174e6e005f75c41..2070089053ef0b6e7e0ca33c2c6cc4cea17b8e29 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 fa83c534d0639241205758018f8f7c37401e6b22..5b580f26821e67cc96c8347e485b792f40105176 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 c7b789c2343a8dfd1e847652af2bd1d6adfd51f1..735e2c9abab91f00560faa5496e234321027b82c 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 91d07e30469e675fd2027f29290e35a0db888174..160563064cc47effd463c4915b0c7f0d93bff56f 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 932580e03e7ccc4495d8d76be2f7147369e36d68..c5cf2cb3a0177a5cce9ad0cf460484e63ded0ecd 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 195c676c11d53b19e0d18ed4908198a929d188aa..bec6139c2d089e90d09fa239e1b15c9a835fd4ea 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 c304237ea57ba15d48cff0773860cdc469fc2a04..4fa7d5c121bacff122821fe983ed443e3c6db249 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 4cd5c134293d85983146352175e278915ab1d2ba..8666030fba4390d29d9324f5a5c7d60324325f05 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 532fca6b856f296624c21e9a18421763c4b70f48..6d01caa3b7c0875cff4f3e16131ddd09195e92b7 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 8e299f40e6ddd04a3ce9f8d9dffff49b1de36189..b1b2b4f2e312b6372e10a2fce3ef12eab2dddded 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 930a33e43c706e6e91475fc97671c39c23f63387..eb29e45805671072428318412f27b05d0da90199 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 0eb8f3f24d0e51f2aaa12f1fd672043599490082..0000000000000000000000000000000000000000 --- a/hpvm/test/dnn_benchmarks/hpvm-c/include/config.h.in +++ /dev/null @@ -1 +0,0 @@ -#define MODEL_PARAMS_DIR "@MODEL_PARAMS_DIR@"