From 78280f95c30488b068096ea3d4fc463faf3fbe88 Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@miranda.cs.illinois.edu> Date: Tue, 2 Feb 2021 01:49:30 -0600 Subject: [PATCH] BugFix: Setting runtime control policy to BASE (no config change) --- .../tensor_runtime/src/hpvm-rt-controller.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp index 5b0f0beedb..074c12d2ab 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp @@ -1508,13 +1508,14 @@ hpvm_rt_readLabelsBatch_cached(const char *labels_file, int start, int end) { ERROR("Data file %s is not found. Aborting...\n", labels_file); abort(); } + // Get number of labels fseek(file, 0, SEEK_END); long size = ftell(file); fseek(file, 0, SEEK_SET); // return file pointer to beginning // Allocate memory for labels - labels_from_file = (uint32_t *)malloc(size); + labels_from_file = (uint32_t *) malloc(size); if (labels_from_file == NULL) { ERROR("Memory allocation for labels unsucessfull. Aborting...\n"); abort(); @@ -1592,9 +1593,9 @@ float hpvm_rt_computeAccuracy3(uint32_t *labels, void *result_ptr) { } -//#define llvm_hpvm_invokeRtControl_BASE llvm_hpvm_invokeRtControl +#define llvm_hpvm_invokeRtControl_BASE llvm_hpvm_invokeRtControl //#define llvm_hpvm_invokeRtControl_ADJUST_PR llvm_hpvm_invokeRtControl -#define llvm_hpvm_invokeRtControl_ITERATE llvm_hpvm_invokeRtControl +//#define llvm_hpvm_invokeRtControl_ITERATE llvm_hpvm_invokeRtControl extern "C" void llvm_hpvm_invokeRtControl_BASE( void *result, const char *str, int start, int end) { -- GitLab