From 5f986728466df8ddbcd134d2fe2a5fbb7c46d40f Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@tyler.cs.illinois.edu> Date: Mon, 4 May 2020 01:21:12 -0500 Subject: [PATCH] Adding try/catch for top baseline time to be in config file --- .../tensor_runtime/src/hpvm-rt-controller.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp b/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp index f716aaf783..6574b5daa9 100644 --- a/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp +++ b/llvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp @@ -519,9 +519,15 @@ void RuntimeController::readConfigurationFile(const char *str) { std::string first_line; std::getline(qin, first_line); DEBUG("first_line: %s\n", first_line.c_str()); - baseline_time = std::stod(first_line); - DEBUG("Baseline time: %lf\n\n", baseline_time); + try{ + baseline_time = std::stod(first_line); + DEBUG("Baseline time: %lf\n\n", baseline_time); + } + catch(...){ + ERROR("Please Add/Fix Baseline Time at Top of Config File.. "); + } + for (std::string line; std::getline(qin, line);) { DEBUG("line: %s\n", line.c_str()); -- GitLab