Update perf monitoring scripts to generate html/svg outputs

This commit is contained in:
Gael Guennebaud 2016-12-07 13:36:56 +01:00
parent f2c506b03d
commit 59a59fa8e7
9 changed files with 233 additions and 6 deletions

View File

@ -0,0 +1,37 @@
/* setup the chart and its options */
var chart = nv.models.lineChart()
.color(d3.scale.category10().range())
.margin({left: 75, bottom: 100})
.forceX([0]).forceY([0]);
chart.x(function(datum){ return datum.r; })
.xAxis.options({
axisLabel: customSettings.XLABEL || 'Changeset',
tickFormat: d3.format('.0f')
});
chart.xAxis
.tickValues(changesets_count)
.tickFormat(function(d){return changesets[d]})
.rotateLabels(-90);
chart.y(function(datum){ return datum.v; })
.yAxis.options({
axisLabel: customSettings.YLABEL || 'GFlops'/*,
tickFormat: function(val){ return d3.format('.0f')(val) + ' GFlops'; }*/
});
//chart.useInteractiveGuideline(true);
d3.select('#chart').datum(data).call(chart);
var plot = d3.select('#chart > g');
/* setup the title */
plot.append('text')
.style('font-size', '24px')
.attr('text-anchor', 'middle').attr('x', '50%').attr('y', '20px')
.text(customSettings.TITLE || '');
/* ensure the chart is responsive */
nv.utils.windowResize(chart.update);
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
</table>
</body>
</html>

View File

@ -32,8 +32,67 @@ echo " " >> $WHAT.gnuplot
gnuplot -persist < $WHAT.gnuplot
# generate a png file
convert -background white -density 1000 -resize 1000 -colors 256 -quality 0 $WHAT.pdf -background white -flatten $WHAT.png
# generate a png file (thumbnail)
convert -background white -density 300 -resize 300 -colors 256 -quality 0 $WHAT.pdf -background white -flatten $WHAT.png
# clean
rm $WHAT.out.header $WHAT.gnuplot
# generate html/svg graph
echo " " > $WHAT.html
cat ../chart_header.html > $WHAT.html
echo 'var customSettings = {"TITLE":"","SUBTITLE":"","XLABEL":"","YLABEL":""};' >> $WHAT.html
# 'data' is an array of datasets (i.e. curves), each of which is an object of the form
# {
# key: <name of the curve>,
# color: <optional color of the curve>,
# values: [{
# r: <revision number>,
# v: <GFlops>
# }]
# }
echo 'var data = [' >> $WHAT.html
col=2
while read line
do
if [ ! -z '$line' ]; then
header="$header \"$line\""
echo '{"key":"'$line'","values":[' >> $WHAT.html
i=0
while read line2
do
if [ ! -z '$line2' ]; then
echo '{"r":'$i',"v":'`echo $line2 | cut -f $col -d ' '`'},' >> $WHAT.html
fi
((i++))
done < $WHAT.out
echo ']},' >> $WHAT.html
fi
((col++))
done < $settings_file
echo '];' >> $WHAT.html
echo 'var changesets = [' >> $WHAT.html
while read line2
do
if [ ! -z '$line2' ]; then
echo '"'`echo $line2 | cut -f 1 -d ' '`'",' >> $WHAT.html
fi
done < $WHAT.out
echo '];' >> $WHAT.html
echo 'var changesets_count = [' >> $WHAT.html
i=0
while read line2
do
if [ ! -z '$line2' ]; then
echo $i ',' >> $WHAT.html
fi
((i++))
done < $WHAT.out
echo '];' >> $WHAT.html
cat ../chart_footer.html >> $WHAT.html

View File

@ -1,6 +1,6 @@
#!/bin/bash
# ./runall.sh
# ./runall.sh "Title"
# Examples of environment variables to be set:
# PREFIX="haswell-fma-"
@ -21,3 +21,34 @@
./run.sh trmv_lot gemv_square_settings.txt $*
./run.sh llt gemm_square_settings.txt $*
# generate html file
function print_td {
echo '<td><a href="'$PREFIX$1"$2"'.html"><img src="'$PREFIX$1"$2"'.png" title="'$3'"></a></td>' >> $htmlfile
}
function print_tr {
echo '<tr><th colspan="3">'"$2"'</th></tr>' >> $htmlfile
echo '<tr>' >> $htmlfile
print_td s $1 float
print_td d $1 double
print_td c $1 complex
echo '</tr>' >> $htmlfile
}
htmlfile="index.html"
cat ../header.html > $htmlfile
echo '<h1>'$1'</h1>' >> $htmlfile
echo '<table>' >> $htmlfile
print_tr gemm 'C += A &middot; B &nbsp; (gemm)'
print_tr lazy_gemm 'C += A &middot; B &nbsp; (gemm lazy)'
print_tr gemv 'y += A &middot; x &nbsp; (gemv)'
print_tr gemvt 'y += A<sup>T</sup> &middot; x &nbsp; (gemv)'
print_tr trmv_up 'y += U &middot; x &nbsp; (trmv)'
print_tr trmv_upt 'y += U<sup>T</sup> &middot; x &nbsp; (trmv)'
print_tr trmv_lo 'y += L &middot; x &nbsp; (trmv)'
print_tr trmv_lot 'y += L<sup>T</sup> &middot; x &nbsp; (trmv)'
print_tr trmv_lot 'L &middot; L<sup>T<sup> = A &nbsp; (Cholesky,potrf)'
cat ../footer.html >> $htmlfile

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Eigen performance monitoring</title>
<style type="text/css">
body
{
background:#fff;
}
th {
}
img
{
width:auto;
box-shadow:0px 0px 20px #cecece;
margin: 20px 20px 20px 20px;
-moz-transform: scale(1);
-moz-transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-webkit-transform: scale(1);
-ms-transform: scale(1);
-ms-transition-duration: 0.4s;
}
img:hover
{
box-shadow: 5px 5px 20px #dcdcdc;
-moz-transform: scale(1.1);
-moz-transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
-ms-transition-duration: 0.4s;
}
</style>
</head>
<body>

View File

@ -7,12 +7,19 @@ USER='ggael'
UPLOAD_DIR=perf_monitoring/ggaelmacbook26
EIGEN_SOURCE_PATH=$HOME/Eigen/eigen
export PREFIX="haswell-fma-"
export CXX_FLAGS="-mfma"
export CXX_FLAGS="-mfma -w"
$EIGEN_SOURCE_PATH/bench/perf_monitoring/gemm/runall.sh $*
####
BENCH_PATH=$EIGEN_SOURCE_PATH/bench/perf_monitoring/gemm/
PREVPATH=`pwd`
cd $BENCH_PATH && ./runall.sh "Haswell 2.6GHz, FMA, Apple's clang" $*
cd $PREVPATH
ALLFILES="$BENCH_PATH/$PREFIX*.png $BENCH_PATH/$PREFIX*.html $BENCH_PATH/index.html $BENCH_PATH/s1.js $BENCH_PATH/s2.js"
# (the '/' at the end of path is very important, see rsync documentation)
rsync -az --no-p --delete $EIGEN_SOURCE_PATH/bench/perf_monitoring/gemm/haswell-fma-*.png $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR/ || { echo "upload failed"; exit 1; }
rsync -az --no-p --delete $ALLFILES $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR/ || { echo "upload failed"; exit 1; }
# fix the perm
ssh $USER@ssh.tuxfamily.org "chmod -R g+w /home/eigen/eigen.tuxfamily.org-web/htdocs/perf_monitoring" || { echo "perm failed"; exit 1; }