runall.sh 2.0 KB

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