From f0ff9ee53c9cf30e7e295fe9c0a1e02189c8e527 Mon Sep 17 00:00:00 2001 From: Yifan Zhao <yifanz16@illinois.edu> Date: Wed, 20 Jan 2021 22:45:49 -0600 Subject: [PATCH] Fixed model_param path in dnn benchmarks --- hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp | 4 ++-- .../dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp | 4 ++-- hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp | 4 ++-- .../dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp | 4 ++-- .../benchmarks/alexnet_imagenet/alexnet_imagenet.cpp | 5 +++-- .../benchmarks/alexnet_imagenet/alexnet_imagenet_loop.cpp | 5 +++-- .../dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp | 4 ++-- .../benchmarks/lenet_mnist/lenet_mnist_loop.cpp | 4 ++-- .../dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp | 4 ++-- .../benchmarks/mobilenet/mobilenet_loop.cpp | 8 ++------ hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp | 4 ++-- .../dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp | 4 ++-- .../benchmarks/resnet50_imagenet/resnet50_imagenet.cpp | 5 +++-- .../resnet50_imagenet/resnet50_imagenet_loop.cpp | 5 +++-- .../benchmarks/vgg16_cifar10/vgg16_cifar10.cpp | 4 ++-- .../benchmarks/vgg16_cifar10/vgg16_cifar10_loop.cpp | 4 ++-- .../benchmarks/vgg16_cifar100/vgg16_cifar100.cpp | 4 ++-- .../benchmarks/vgg16_cifar100/vgg16_cifar100_loop.cpp | 4 ++-- .../benchmarks/vgg16_imagenet/vgg16_imagenet.cpp | 4 ++-- .../benchmarks/vgg16_imagenet/vgg16_imagenet_loop.cpp | 5 +++-- 20 files changed, 45 insertions(+), 44 deletions(-) diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp index e2810e171d..8202cbccfe 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -364,8 +365,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/alexnet_cifar10/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet_cifar10/"; std::string input_path = dir_prefix + std::string("input.bin"); void *input = readTrainedWeights(input_path.c_str(), 0, 5000, 3, 32, 32); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp index a625b4903f..5a8b87eb5a 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet_loop.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -363,8 +364,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/alexnet_cifar10/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet_cifar10/"; std::string input_path = dir_prefix + std::string("input.bin"); // void* input = readTrainedWeights(input_path.c_str(), 0,5000,3,32,32); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp index 966ef8934c..2aad203263 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -412,8 +413,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/alexnet2_cifar10/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet2_cifar10/"; std::string labels_path = dir_prefix + std::string("labels32.bin"); std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp index fdc5883375..03a9df14b0 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet2/alexnet2_loop.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -412,8 +413,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/alexnet2_cifar10/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/alexnet2_cifar10/"; std::string labels_path = dir_prefix + std::string("labels32.bin"); std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); 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 70c3ce6cf8..0d50f566f9 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet_imagenet/alexnet_imagenet.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -461,8 +462,8 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string("../../../../../projects/hpvm-tensor-rt/" - "model_params/alexnet_imagenet_tune/"); + 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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); 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 6d44b14a58..5902772806 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 @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -461,8 +462,8 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string("../../../../../projects/hpvm-tensor-rt/" - "model_params/alexnet_imagenet_tune/"); + 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"); 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 562be01186..f24be84b31 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/lenet_mnist/lenet_mnist.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -265,8 +266,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/lenet_mnist/"); + 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"); 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 a158c877bc..646fee2749 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 @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -265,8 +266,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/lenet_mnist/"); + 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"); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp index 9fca1fafea..f91e148d95 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -1966,8 +1967,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/mobilenet/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/mobilenet/"; std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels.bin"); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet_loop.cpp index 62a8902e8f..cb04d21144 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet_loop.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet_loop.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -1965,12 +1966,7 @@ typedef struct __attribute__((__packed__)) { } RootIn; int main() { - - // std::string dir_prefix = - // std::string("../../../../../projects/hpvm-tensor-rt/model_params/mobilenet_quant/"); - - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/mobilenet/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/mobilenet/"; std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels32.bin"); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp index cd636f6642..9941ac9771 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18.cpp @@ -9,6 +9,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -1227,8 +1228,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/resnet18_cifar10/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/resnet18_cifar10/"; std::string input_path = dir_prefix + std::string("input.bin"); void *input = readTrainedWeights(input_path.c_str(), 0, 5000, 3, 32, 32); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp index 2d80c87b1c..44601685d7 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/resnet18/resnet18_loop.cpp @@ -9,6 +9,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -1300,8 +1301,7 @@ typedef struct __attribute__((__packed__)) { } RootIn; int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/resnet18_cifar10/"); + std::string dir_prefix = std::string(MODEL_PARAMS_DIR) + "/resnet18_cifar10/"; std::string input_path = dir_prefix + std::string("input.bin"); // void* input = readTrainedWeights(input_path.c_str(), 0,5000,3,32,32); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp index 17bda0f678..c4bd6be08b 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -4904,8 +4905,8 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/resnet50_imagenet/"); + std::string dir_prefix = + std::string(MODEL_PARAMS_DIR) + "/resnet50_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"); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet_loop.cpp b/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet_loop.cpp index b21306d693..09e5709c7d 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet_loop.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/resnet50_imagenet/resnet50_imagenet_loop.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -5133,8 +5134,8 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/resnet50_imagenet/"); + std::string dir_prefix = + std::string(MODEL_PARAMS_DIR) + "/resnet50_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"); 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 b210ba0e5f..78b762a210 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar10/vgg16_cifar10.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -828,8 +829,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/vgg16_cifar10/"); + 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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); 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 3ac42107be..d35d209570 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 @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -828,8 +829,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/vgg16_cifar10/"); + 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 conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); 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 85e02ec3c9..f931cc76b4 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_cifar100/vgg16_cifar100.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -828,8 +829,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/vgg16_cifar100/"); + 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"); 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 f95837fdec..1e38763e76 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 @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -828,8 +829,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/vgg16_cifar100/"); + 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"); diff --git a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp index 4710a232e8..f269aa9091 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/vgg16_imagenet/vgg16_imagenet.cpp @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::CUDNN_TARGET); @@ -876,8 +877,7 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string( - "../../../../../projects/hpvm-tensor-rt/model_params/vgg16_imagenet/"); + std::string dir_prefix = 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"); 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 06b9da0afe..e55cf3648d 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 @@ -8,6 +8,7 @@ #include <hpvm.h> #include <tensorTypes.h> #include <tensorUtils.h> +#include <config.h> void var_0_node(void *t1, size_t bytes_t1, void *t2, size_t bytes_t2) { __hpvm__hint(hpvm::PROMISE_TARGET); @@ -876,8 +877,8 @@ typedef struct __attribute__((__packed__)) { int main() { - std::string dir_prefix = std::string("../../../../../projects/hpvm-tensor-rt/" - "model_params/vgg16_imagenet_tune/"); + std::string dir_prefix = + std::string(MODEL_PARAMS_DIR) + "/vgg16_imagenet_tune/"; 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