Pārlūkot izejas kodu

Include dw_block_spmv when we have cblas_sgemv in the blas lib, not only in the atlas case

Samuel Thibault 5 gadi atpakaļ
vecāks
revīzija
5b8347c7a1
2 mainītis faili ar 8 papildinājumiem un 4 dzēšanām
  1. 6 0
      configure.ac
  2. 2 4
      examples/Makefile.am

+ 6 - 0
configure.ac

@@ -3010,6 +3010,12 @@ if test x$blas_lib = xmaybe; then
     fi
 fi
 
+SAVED_LIBS="${LIBS}"
+LIBS="$LIBS $STARPU_BLAS_LDFLAGS"
+AC_CHECK_FUNC([cblas_sgemv], have_cblas_sgemv=yes)
+AM_CONDITIONAL(BLAS_LIB_HAS_CBLAS_SGEMV, test x$have_cblas_sgemv = xyes)
+LIBS="${SAVED_LIBS}"
+
 AM_CONDITIONAL(ATLAS_BLAS_LIB, test x$blas_lib = xatlas)
 AM_CONDITIONAL(GOTO_BLAS_LIB, test x$blas_lib = xgoto)
 AM_CONDITIONAL(MKL_BLAS_LIB, test x$blas_lib = xmkl)

+ 2 - 4
examples/Makefile.am

@@ -1,7 +1,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 # Copyright (C) 2011-2017                                Inria
-# Copyright (C) 2009-2019                                Université de Bordeaux
+# Copyright (C) 2009-2020                                Université de Bordeaux
 # Copyright (C) 2017                                     Erwan Leria
 # Copyright (C) 2010-2015,2017,2018,2019                 CNRS
 # Copyright (C) 2011                                     Télécom-SudParis
@@ -348,7 +348,7 @@ STARPU_EXAMPLES +=				\
 	lu/lu_implicit_example_complex_double
 endif
 
-if ATLAS_BLAS_LIB
+if BLAS_LIB_HAS_CBLAS_SGEMV
 STARPU_EXAMPLES +=				\
 	spmv/dw_block_spmv
 endif
@@ -889,7 +889,6 @@ spmv_spmv_SOURCES +=				\
 	spmv/spmv_cuda.cu
 endif
 
-if ATLAS_BLAS_LIB
 spmv_dw_block_spmv_SOURCES =			\
 	spmv/dw_block_spmv.c			\
 	spmv/dw_block_spmv_kernels.c		\
@@ -898,7 +897,6 @@ spmv_dw_block_spmv_SOURCES =			\
 
 spmv_dw_block_spmv_LDADD =			\
 	$(STARPU_BLAS_LDFLAGS)
-endif
 
 ###########################
 # C++ Incrementer example #