From bd2fa8122d883e0f236a4715b7b83ec0de1a6cfd Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@miranda.cs.illinois.edu> Date: Mon, 5 Apr 2021 22:09:04 -0500 Subject: [PATCH] Adding some necessary comments for config selecvtion policy --- .../tensor_runtime/src/hpvm-rt-controller.cpp | 11 ++++++++--- 1 file changed, 8 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 2c2a23d36c..0332313c57 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 @@ -15,7 +15,11 @@ //===----------------------------------------------------------------------===// +// ***NOTE*** The macro definitions below control the runtime policy + +//--- llvm_hpvm_invokeRtControl_BASE is the baseline policy (default) that just uses the first config (configuration file) #define llvm_hpvm_invokeRtControl_BASE llvm_hpvm_invokeRtControl +//--- llvm_hpvm_invokeRtControl_ADJUST_PR is the probabilistic config selection from Pareto curve - Uncomment to use //#define llvm_hpvm_invokeRtControl_ADJUST_PR llvm_hpvm_invokeRtControl @@ -1232,8 +1236,8 @@ float hpvm_rt_computeAccuracy3(uint32_t *labels, void *result_ptr) { return accuracy; } - -/* NOTE: This is the default config selection routine - it selects the first configuration in the config-file */ +// This routine is used when llvm_hpvm_invokeRtControl macro is set to llvm_hpvm_invokeRtControl_BASE +// This is the default config selection routine - it selects the first configuration in the config-file extern "C" void llvm_hpvm_invokeRtControl_BASE(void *result, const char *str, int start, int end) { @@ -1260,7 +1264,8 @@ extern "C" void llvm_hpvm_invokeRtControl_BASE(void *result, const char *str, } - +/// This routine is used when `llvm_hpvm_invokeRtControl` macro is set to `llvm_hpvm_invokeRtControl_ADJUST_PR` +/// This routine does probabilistic selection of configurations from the Pareto curve extern "C" void llvm_hpvm_invokeRtControl_ADJUST_PR(void *result, const char *str, int start, -- GitLab