[ENHANCE] Updated runBenchmarks.sh
@@ -5,11 +5,22 @@ BENCHMARKS="sadd saxpy sgemm spmv addvector dotvector rotatevector rotateimage c
MAIN_CLASS="Benchmark"
TORNADO_CMD="tornado"
+
+if [ -z "${TORNADO_FLAGS}" ]; then
+ TORNADO_FLAGS="-Xms8G -Dtornado.kernels.coarsener=False -Dtornado.profiles.dump=False -Dtornado.profiling.enable=True -Dtornado.opencl.schedule=True"
+fi
+
DATE=$(date '+%Y-%m-%d-%H:%M')
RESULTS_ROOT="${TORNADO_ROOT}/var/results"
BM_ROOT="${RESULTS_ROOT}/${DATE}"
+if [ -z "${DEVICES}" ]; then
+ echo "Please set env variable DEVICES."
+ echo " e.g. DEVICES=0:0,0:1"
+ exit
+fi
+
if [ ! -d ${BM_ROOT} ]; then
mkdir -p ${BM_ROOT}
fi
@@ -22,12 +33,18 @@ if [ ! -z "${TORNADO_FLAGS}" ];then
echo ${TORNADO_FLAGS} > "${BM_ROOT}/tornado.flags"
fi
-#echo $(git rev-parse HEAD) > "${BM_ROOT}/git.sha"
+if [ -e ${TORNADO_ROOT}/.git ]; then
+ echo $(git rev-parse HEAD) > "${BM_ROOT}/git.sha"
+fi
+
+${TORNADO_CMD} -Xms8G -Ddevices=${DEVICES} -DstartSize=2 -DendSize=16777216 tornado.benchmarks.DataMovement > "${BM_ROOT}/data-movement.csv"
for bm in ${BENCHMARKS}; do
for (( i=0; i<${ITERATIONS}; i++ )); do
echo "running ${i} ${bm} ..."
- ${TORNADO_CMD} ${TORNADO_FLAGS} tornado.benchmarks.BenchmarkRunner ${PACKAGE}.${bm}.${MAIN_CLASS} >> "${LOGFILE}-${bm}-${i}.log"
+ OUTFILE="${LOGFILE}-${bm}-${i}.log"
+ ${TORNADO_CMD} ${TORNADO_FLAGS} tornado.benchmarks.BenchmarkRunner ${PACKAGE}.${bm}.${MAIN_CLASS} >> "${OUTFILE}"
+ ${TORNADO_ROOT}/bin/convert2csv.sh ${OUTFILE}
done
done
