cart-elc

Source code for CART-ELC
git clone git://git.laack.co/cart-elc.git
Log | Files | Refs | README | LICENSE

runall.sh (2031B)


      1 #!/bin/bash
      2 
      3 # ./runall.sh "Title"
      4 
      5 # Examples of environment variables to be set:
      6 #   PREFIX="haswell-fma-"
      7 #   CXX_FLAGS="-mfma"
      8 #   CXX=clang++
      9 
     10 # Options:
     11 #   -up : enforce the recomputation of existing data, and keep best results as a merging strategy
     12 #   -s  : recompute selected changesets only and keep bests
     13 #   -np : no plotting of results, just generate the data
     14 
     15 if [[ "$*" =~ '-np' ]]; then
     16   do_plot=false
     17 else
     18   do_plot=true
     19 fi
     20 
     21 ./run.sh gemm gemm_settings.txt $*
     22 ./run.sh lazy_gemm lazy_gemm_settings.txt $*
     23 ./run.sh gemv gemv_settings.txt $*
     24 ./run.sh gemvt gemv_settings.txt $*
     25 ./run.sh trmv_up gemv_square_settings.txt $*
     26 ./run.sh trmv_lo gemv_square_settings.txt $*
     27 ./run.sh trmv_upt gemv_square_settings.txt $*
     28 ./run.sh trmv_lot gemv_square_settings.txt $*
     29 ./run.sh llt gemm_square_settings.txt $*
     30 
     31 if $do_plot ; then
     32 
     33 # generate html file
     34 
     35 function print_td {
     36   echo '<td><a href="'$PREFIX'-'$1"$2"'.html"><img src="'$PREFIX'-'$1"$2"'.png" title="'$3'"></a></td>' >> $htmlfile
     37 }
     38 
     39 function print_tr {
     40   echo '<tr><th colspan="3">'"$2"'</th></tr>' >> $htmlfile
     41   echo '<tr>' >> $htmlfile
     42   print_td s $1 float
     43   print_td d $1 double
     44   print_td c $1 complex
     45   echo '</tr>' >> $htmlfile
     46 }
     47 
     48 if [ -n "$PREFIX" ]; then
     49 
     50 
     51 cp resources/s1.js $PREFIX/
     52 cp resources/s2.js $PREFIX/
     53 
     54 htmlfile="$PREFIX/index.html"
     55 cat resources/header.html > $htmlfile
     56 
     57 echo '<h1>'$1'</h1>' >> $htmlfile
     58 echo '<table>' >> $htmlfile
     59 print_tr gemm       'C += A &middot; B   &nbsp; (gemm)'
     60 print_tr lazy_gemm  'C += A &middot; B   &nbsp; (gemm lazy)'
     61 print_tr gemv       'y += A &middot; x   &nbsp; (gemv)'
     62 print_tr gemvt      'y += A<sup>T</sup> &middot; x  &nbsp; (gemv)'
     63 print_tr trmv_up    'y += U &middot; x   &nbsp; (trmv)'
     64 print_tr trmv_upt   'y += U<sup>T</sup> &middot; x  &nbsp; (trmv)'
     65 print_tr trmv_lo    'y += L &middot; x   &nbsp; (trmv)'
     66 print_tr trmv_lot   'y += L<sup>T</sup> &middot; x  &nbsp; (trmv)'
     67 print_tr trmv_lot   'L &middot; L<sup>T<sup> = A &nbsp;  (Cholesky,potrf)'
     68 
     69 cat resources/footer.html >> $htmlfile
     70 
     71 fi
     72 fi