Skip to content
Snippets Groups Projects
Commit f097e39a authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Installer optionally downloads model_params

parent c21cfef8
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
function read_yn {
read -p "$1 [y/n]: " read_value
while [ ! $read_value == "y" ] && [ ! $read_value == "n" ]; do
echo "Please answer y or n; got $read_value"
read -p "$1 [y/n]:" read_value
done
eval $2=$read_value
}
VERSION="9.0.0" VERSION="9.0.0"
URL="http://releases.llvm.org" URL="http://releases.llvm.org"
...@@ -19,14 +28,7 @@ LLVM_SRC="llvm-$VERSION.src" ...@@ -19,14 +28,7 @@ LLVM_SRC="llvm-$VERSION.src"
HPVM_RT=hpvm-rt/hpvm-rt.bc HPVM_RT=hpvm-rt/hpvm-rt.bc
AUTOMATE="y" read_yn "Build and install HPVM automatically?" AUTOMATE
read -p "Build and install HPVM automatically? (y or n): " AUTOMATE
if [ ! $AUTOMATE == "y" ] && [ ! $AUTOMATE == "n" ]; then
echo invalid input!
exit -1
fi
echo echo
read -p "Number of threads: " NUM_THREADS read -p "Number of threads: " NUM_THREADS
...@@ -141,6 +143,21 @@ echo make -j$NUM_THREADS ...@@ -141,6 +143,21 @@ echo make -j$NUM_THREADS
make -j$NUM_THREADS make -j$NUM_THREADS
#make install #make install
read_yn "Download weights necessary to run DNN benchmarks?" DOWNLOAD_WEIGHTS
if [ $DOWNLOAD_WEIGHTS == "y" ]; then
# 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
# Download the zip file from google drive
./gdown.pl 'https://drive.google.com/file/d/1V_yd9sKcZQ7zhnO5YhRpOsaBPLEEvM9u' model_params.zip
unzip model_params.zip # should give a "model_params" folder
mv model_params $BUILD_DIR
# All our benchmarks also know to look for parameters in <build_dir>/model_params.
# Cleanup:
rm gdown.pl model_params.zip
else
echo "Skipping weight download"
fi
if [ -f $BUILD_DIR/tools/hpvm/projects/$HPVM_RT ]; then if [ -f $BUILD_DIR/tools/hpvm/projects/$HPVM_RT ]; then
true true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment