From 65bb1fea668175d532e78eda22284eef934c5eb4 Mon Sep 17 00:00:00 2001 From: Yifan Zhao <yifanz16@illinois.edu> Date: Sun, 4 Apr 2021 00:25:53 -0500 Subject: [PATCH] Added loop-no-unroll tag to both mode of frontend (we'll come back to solve the real problem later) --- hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm.cpp.in | 2 +- .../projects/torch2hpvm/torch2hpvm/template_hpvm_inspect.cpp.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm.cpp.in b/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm.cpp.in index fa252a3e0c..d748939845 100644 --- a/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm.cpp.in +++ b/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm.cpp.in @@ -89,7 +89,7 @@ int main(int argc, char *argv[]){ __hpvm__init(); startMemTracking(); - #pragma clang loop unroll(disable) +#pragma clang loop unroll(disable) for (int i = 0; i < batch_count; i++){ int start = i * batch_size, end = start + batch_size; void *{{input_name}} = readInputBatch(input_path.c_str(), 0, start, end, {{input_shape|join(', ')}}); diff --git a/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm_inspect.cpp.in b/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm_inspect.cpp.in index 3d6ddd7c75..7db01d87af 100644 --- a/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm_inspect.cpp.in +++ b/hpvm/projects/torch2hpvm/torch2hpvm/template_hpvm_inspect.cpp.in @@ -140,6 +140,7 @@ int main(){ // Keep this open so the other side knows we have more batches to write auto* fp = open_fifo("{{fifo_path_w}}", "wb"); float total_accuracy = 0; +#pragma clang loop unroll(disable) for (int i = 0; i < batch_count; i++){ int start = i * batch_size, end = start + batch_size; void *{{input_name}} = readInputBatch(input_pth, 0, start, end, {{input_shape|join(', ')}}); -- GitLab