blas_model.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2008-2021 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. #ifndef __BLAS_MODEL_H__
  17. #define __BLAS_MODEL_H__
  18. #include <starpu.h>
  19. double gemm_cost(struct starpu_task *task, unsigned nimpl);
  20. static struct starpu_perfmodel starpu_sgemm_model =
  21. {
  22. .type = STARPU_HISTORY_BASED,
  23. #ifdef STARPU_ATLAS
  24. .symbol = "sgemm_atlas"
  25. #elif defined(STARPU_GOTO)
  26. .symbol = "sgemm_goto"
  27. #elif defined(STARPU_OPENBLAS)
  28. .symbol = "sgemm_openblas"
  29. #else
  30. .symbol = "sgemm"
  31. #endif
  32. };
  33. static struct starpu_perfmodel starpu_sgemm_model_common =
  34. {
  35. .cost_function = gemm_cost,
  36. .type = STARPU_COMMON,
  37. };
  38. static struct starpu_perfmodel starpu_dgemm_model =
  39. {
  40. .type = STARPU_HISTORY_BASED,
  41. #ifdef STARPU_ATLAS
  42. .symbol = "dgemm_atlas"
  43. #elif defined(STARPU_GOTO)
  44. .symbol = "dgemm_goto"
  45. #elif defined(STARPU_OPENBLAS)
  46. .symbol = "dgemm_openblas"
  47. #else
  48. .symbol = "dgemm"
  49. #endif
  50. };
  51. static struct starpu_perfmodel starpu_dgemm_model_common =
  52. {
  53. .cost_function = gemm_cost,
  54. .type = STARPU_COMMON,
  55. };
  56. #endif /* __BLAS_MODEL_H__ */