From 912ed6194427ee83aa0e2431f714264e4603e834 Mon Sep 17 00:00:00 2001 From: Joel Hestness Date: Fri, 23 Nov 2018 10:44:51 -0800 Subject: [PATCH] PPoPP 2019: Add script to generate paper results (#1) These scripts run everything required to generate PPoPP 2019 paper results in Figures 7-10. * Fully generate and gather PPoPP 2019 results --- .../tensorflow/full_models/gather_results.sh | 33 +++++++++++ .../full_models/generate_results.sh | 58 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 catamount/frameworks/example_graphs/tensorflow/full_models/gather_results.sh create mode 100644 catamount/frameworks/example_graphs/tensorflow/full_models/generate_results.sh diff --git a/catamount/frameworks/example_graphs/tensorflow/full_models/gather_results.sh b/catamount/frameworks/example_graphs/tensorflow/full_models/gather_results.sh new file mode 100644 index 0000000..100f099 --- /dev/null +++ b/catamount/frameworks/example_graphs/tensorflow/full_models/gather_results.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +outdir="ppopp_2019_tests" + +ls $outdir + +echo "=============== Character Language Model ===============" +grep -A50000 "======= Algorithmic graph-level analytics: =======" $outdir/output_charlm.txt | grep -v "=====" + +echo -e "\n\n" + +echo "=============== Word Language Model ===============" +grep -A50000 "======= Algorithmic graph-level analytics: =======" $outdir/output_wordlm.txt | grep -v "=====" + +echo -e "\n\n" + +echo "=============== Machine Translation Model ===============" +grep -A50000 "======= Algorithmic graph-level analytics: =======" $outdir/output_nmt.txt | grep -v "=====" + +echo -e "\n\n" + +echo "=============== Image Classification Models ===============" +for depth in 18 34 50 101 152 +do + echo "--------------- ResNet-$depth ---------------" + grep -A50000 "======= Algorithmic graph-level analytics: =======" $outdir/output_image_$depth.txt | grep -v "=====" + echo "" +done + +echo -e "\n\n" + +echo "=============== Speech Recognition Model ===============" +grep -A50000 "======= Algorithmic graph-level analytics: =======" $outdir/output_speech.txt | grep -v "=====" diff --git a/catamount/frameworks/example_graphs/tensorflow/full_models/generate_results.sh b/catamount/frameworks/example_graphs/tensorflow/full_models/generate_results.sh new file mode 100644 index 0000000..f8bbb8d --- /dev/null +++ b/catamount/frameworks/example_graphs/tensorflow/full_models/generate_results.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Set up virtual environment +if [ ! -e "catamount_venv" ] +then + echo "==== Creating virtual environment ====" + python -m venv catamount_venv + echo "" +fi + +echo "==== Sourcing virtual environment ====" +source catamount_venv/bin/activate +export PYTHONPATH=$VIRTUAL_ENV/lib/python3.6/site-packages/ +echo "" + +echo "==== Installing dependencies ====" +pip install -r requirements.txt +echo "" + +echo "==== Installing Catamount ====" +python setup.py install +echo "" + +outdir="ppopp_2019_tests" +if [ ! -e "$outdir" ] +then + echo "==== Creating output directory ====" + mkdir -p $outdir + echo "" +fi + +# Run tests +# Use CUDA_VISIBLE_DEVICES="" in case system has access to GPUs, +# but we don't want to use them +for depth in 18 34 50 101 152 +do + outfile="$outdir/output_image_$depth.txt" + echo "==== Running Image ResNet$depth. Output to $outfile ====" + CUDA_VISIBLE_DEVICES="" python catamount/tests/full/tf_image_resnet.py --depth $depth >& $outfile + echo "" +done + +for domain in charlm nmt wordlm +do + outfile="$outdir/output_$domain.txt" + echo "==== Running Language $domain. Output to $outfile ====" + CUDA_VISIBLE_DEVICES="" python catamount/tests/full/tf_language_models.py --domain $domain >& $outfile + echo "" +done + +outfile="$outdir/output_speech.txt" +echo "==== Running Speech Attention. Output to $outfile ====" +CUDA_VISIBLE_DEVICES="" python catamount/tests/full/tf_speech_attention.py >& $outfile +echo "" + + +# Gather results +bash catamount/frameworks/example_graphs/tensorflow/full_models/gather_results.sh