소스 검색

SCRIPTS: Parametrized the script with a CPU/GPU option

Now the timing script also receive as a parameter cpu or gpu, so it can
invoke the right run script for the benchmark when running
Andrea Gussoni 8 년 전
부모
커밋
f061b3b116
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      utils/time-and-save.sh

+ 4 - 1
utils/time-and-save.sh

@@ -3,8 +3,11 @@
 # Save path the current path that will be used to store the results.
 BASE_PATH=$(pwd)
 
+# Local variable to store if cpu or gpu directed benchmark
+TYPE=$3
+
 # Enter in the directory passed as first parameter, then execute run and save the results in the file passed as second parameter
 cd $1
 BENCH_NAME=$1
-BENCH_TIME=`(/usr/bin/time -f "%e" ./run) 2>&1 > /dev/null | tail -1`
+BENCH_TIME=`(/usr/bin/time -f "%e" ./run-$TYPE) 2>&1 > /dev/zero | tail -1`
 echo "$BENCH_NAME $BENCH_TIME" >> $BASE_PATH/$2