blas_model.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2008-2012,2014,2018 Université de Bordeaux
  4. * Copyright (C) 2010-2012,2015,2017 CNRS
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __BLAS_MODEL_H__
  18. #define __BLAS_MODEL_H__
  19. #include <starpu.h>
  20. double gemm_cost(struct starpu_task *task, unsigned nimpl);
  21. static struct starpu_perfmodel starpu_sgemm_model =
  22. {
  23. .type = STARPU_HISTORY_BASED,
  24. #ifdef STARPU_ATLAS
  25. .symbol = "sgemm_atlas"
  26. #elif defined(STARPU_GOTO)
  27. .symbol = "sgemm_goto"
  28. #elif defined(STARPU_OPENBLAS)
  29. .symbol = "sgemm_openblas"
  30. #else
  31. .symbol = "sgemm"
  32. #endif
  33. };
  34. static struct starpu_perfmodel starpu_sgemm_model_common =
  35. {
  36. .cost_function = gemm_cost,
  37. .type = STARPU_COMMON,
  38. };
  39. static struct starpu_perfmodel starpu_dgemm_model =
  40. {
  41. .type = STARPU_HISTORY_BASED,
  42. #ifdef STARPU_ATLAS
  43. .symbol = "dgemm_atlas"
  44. #elif defined(STARPU_GOTO)
  45. .symbol = "dgemm_goto"
  46. #elif defined(STARPU_OPENBLAS)
  47. .symbol = "dgemm_openblas"
  48. #else
  49. .symbol = "dgemm"
  50. #endif
  51. };
  52. static struct starpu_perfmodel starpu_dgemm_model_common =
  53. {
  54. .cost_function = gemm_cost,
  55. .type = STARPU_COMMON,
  56. };
  57. #endif /* __BLAS_MODEL_H__ */