perfs.gp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. set term postscript eps enhanced color font ",20"
  17. set key top left
  18. set xlabel "frequency (MHz)"
  19. freq_min = 1200
  20. freq_fast = 3500
  21. power_min = 2
  22. power_fast = 8.2
  23. TRSM_DECAY = 0.5
  24. POTRF_DECAY = 0.5
  25. # Plot the power according to frequency (cubic curve)
  26. freq_min3 = freq_min * freq_min * freq_min
  27. freq_fast3 = freq_fast * freq_fast * freq_fast
  28. alpha = (power_fast - power_min) / (freq_fast3 - freq_min3)
  29. power(frequency) = power_min + alpha * (frequency*frequency*frequency - freq_min3)
  30. set output "power.eps"
  31. set ylabel "power (W)"
  32. plot [frequency=freq_min:freq_fast] [y=0:] power(frequency) lw 2 notitle
  33. # Plot the kernel performance according to frequency
  34. set output "perfs.eps"
  35. set ylabel "performance (GFlop/s)"
  36. gemm_max_perf = 50
  37. trsm_max_perf = 35.784040
  38. potrf_max_perf = 6.964803
  39. gemm_factor(frequency) = frequency / freq_fast
  40. trsm_factor(frequency) = (frequency - freq_min/2) ** TRSM_DECAY / (freq_fast - freq_min/2) ** TRSM_DECAY
  41. potrf_factor(frequency) = 1 - POTRF_DECAY * ((freq_min/(frequency-freq_min/2)) - (freq_min/(freq_fast-freq_min/2)))
  42. plot [frequency=freq_min:freq_fast] \
  43. gemm_max_perf * gemm_factor(frequency) lw 2 title "gemm", \
  44. trsm_max_perf * trsm_factor(frequency) lw 2 title "trsm", \
  45. potrf_max_perf * potrf_factor(frequency) lw 2 title "potrf"
  46. # Plot the kernel efficiency according to frequency
  47. set output "efficiency.eps"
  48. set key top right
  49. set ylabel "efficiency (GFlop/W)"
  50. gemm_max_efficiency = 6.097561
  51. trsm_max_efficiency = 4.363907
  52. potrf_max_efficiency = 0.849366
  53. power_factor(frequency) = power(frequency) / power(freq_fast)
  54. plot [frequency=freq_min:freq_fast] \
  55. gemm_max_efficiency * gemm_factor(frequency) / power_factor(frequency) lw 2 title "gemm", \
  56. trsm_max_efficiency * trsm_factor(frequency) / power_factor(frequency) lw 2 title "trsm", \
  57. potrf_max_efficiency * potrf_factor(frequency) / power_factor(frequency) lw 2 title "potrf"