blaspp: added explicit dependency on CUDA (#17965)

This commit is contained in:
Teodor Nikolov 2020-08-09 20:44:05 +02:00 committed by GitHub
parent bad8734316
commit 902fac185a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
from spack import *
class Blaspp(CMakePackage):
class Blaspp(CMakePackage, CudaPackage):
"""C++ API for the Basic Linear Algebra Subroutines. Developed by the
Innovative Computing Laboratory at the University of Tennessee,
Knoxville."""
@ -62,6 +62,16 @@ def cmake_args(self):
else:
args.append('-DBLAS_LIBRARY_THREADING="sequential"')
# `blaspp` has an implicit CUDA detection mechanism. This disables it
# in cases where it may backfire. One such case is when `cuda` is
# external and marked with `buildable=false`. `blaspp`'s CMake CUDA
# detection mechanism finds CUDA but doesn't set certain paths properly
# which leads to a build issues [1].
#
# [1]: https://bitbucket.org/icl/blaspp/issues/6/compile-error-due-to-implicit-cuda
if '~cuda' in spec:
args.append('-DCMAKE_CUDA_COMPILER=')
# Missing:
#
# - acml : BLAS_LIBRARY="AMD ACML"