From 6c72a5e709b26ca58b8798c05373c956f649662e Mon Sep 17 00:00:00 2001
From: Akash Kothari <akashk4@tyler.cs.illinois.edu>
Date: Thu, 21 Jan 2021 16:02:01 -0600
Subject: [PATCH] Move the message of dowloading weights up in the install
 script

---
 hpvm/scripts/llvm_installer.sh | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/hpvm/scripts/llvm_installer.sh b/hpvm/scripts/llvm_installer.sh
index 13184fd7f7..21ed6ee6d1 100755
--- a/hpvm/scripts/llvm_installer.sh
+++ b/hpvm/scripts/llvm_installer.sh
@@ -32,6 +32,7 @@ HPVM_RT=hpvm-rt/hpvm-rt.bc
 TARGET=all
 TARGET_INPUT=all
 FLAGGED=false
+DOWNLOAD_WEIGHTS=false
 
 # Get flags
 while getopts 'hmj:t:' opt; do
@@ -83,6 +84,7 @@ if $FLAGGED; then
   echo Automated: $AUTOMATE
   echo Threads: $NUM_THREADS
   echo Targets: $TARGET
+  echo Download Weights: $DOWNLOAD_WEIGHTS
   echo
 else
   echo "No Flags found. Using command line prompts."
@@ -122,11 +124,22 @@ else
     TARGET=$TARGET_INPUT
   fi
   echo
+  
+  read_yn "Download weights necessary to run DNN benchmarks?" LOAD_WEIGHTS
+  if [[ $LOAD_WEIGHTS == "" ]]; then
+    echo "No input given. Weights will not be downloaded."
+  elif [[ $LOAD_WEIGHTS == "n" ]]; then
+    echo "Weights will not be downloaded."
+  else
+    DOWNLOAD_WEIGHTS=$LOAD_WEIGHTS
+  fi
+  echo
 
   echo "Running with the following options:"
   echo Automated: $AUTOMATE
   echo Threads: $NUM_THREADS
   echo Targets: $TARGET
+  echo Download Weights: $DOWNLOAD_WEIGHTS
   echo
 fi
 
@@ -239,8 +252,11 @@ echo make -j$NUM_THREADS
 make -j$NUM_THREADS
 #make install
 
-read_yn "Download weights necessary to run DNN benchmarks?" DOWNLOAD_WEIGHTS
 if [ $DOWNLOAD_WEIGHTS == "y" ]; then
+  echo
+  echo "Downloading weights for DNN benchmarks..."
+  echo
+
   # First get hands on gdown -- google drive downloader
   wget https://raw.githubusercontent.com/circulosmeos/gdown.pl/master/gdown.pl -O gdown.pl
   chmod +x ./gdown.pl
-- 
GitLab