diff options
author | Luc Berger <lberge@sandia.gov> | 2024-03-07 10:00:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 09:00:10 -0800 |
commit | e3cb3b29d960c37da83138f26df8c920571ed59b (patch) | |
tree | 6121c6b1f5abfd36f80ea70b0d3ff31f97a84bdc /var | |
parent | ac48ecd3751e273cd5471b4385f0fb9553cbeea4 (diff) | |
download | spack-e3cb3b29d960c37da83138f26df8c920571ed59b.tar.gz spack-e3cb3b29d960c37da83138f26df8c920571ed59b.tar.bz2 spack-e3cb3b29d960c37da83138f26df8c920571ed59b.tar.xz spack-e3cb3b29d960c37da83138f26df8c920571ed59b.zip |
Kokkos Kernels: adding missing TPLs and pre-conditions (#43043)
* Kokkos Kernels: adding missing TPLs and pre-conditions
Adding variants and dependencies for rocBLAS and rocSPARSE.
Also adding a "when=" close to the TPL variants that prevents
enabling the TPLs in versions of the library when it was not
yet available.
* Kokkos Kernels: remove comment for better format
* Kokkos Kernels: fix issue with unpacking wrong number of args
After changing the tpls dictionary we need to update the unpacking
logic to catch the right number of outputs out of it!
* Kokkos Kernels: updating doc string for tpls var and using f-string
Improving comment a bit and switching to f-string for more readability.
When setup to do more testing will try to use f-string in the CMake
options generation part of the package.
* Style change
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/kokkos-kernels/package.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/kokkos-kernels/package.py b/var/spack/repos/builtin/packages/kokkos-kernels/package.py index 38ae9a4dee..36e387208d 100644 --- a/var/spack/repos/builtin/packages/kokkos-kernels/package.py +++ b/var/spack/repos/builtin/packages/kokkos-kernels/package.py @@ -135,20 +135,22 @@ class KokkosKernels(CMakePackage, CudaPackage): variant(eti, default=deflt, description=eti, values=vals, multi=True) tpls = { - # variant name #deflt #spack name #root var name #docstring - "blas": (False, "blas", "BLAS", "Link to system BLAS"), - "lapack": (False, "lapack", "LAPACK", "Link to system LAPACK"), - "mkl": (False, "mkl", "MKL", "Link to system MKL"), - "cublas": (False, "cuda", None, "Link to CUDA BLAS library"), - "cusparse": (False, "cuda", None, "Link to CUDA sparse library"), - "superlu": (False, "superlu", "SUPERLU", "Link to SuperLU library"), - "cblas": (False, "cblas", "CBLAS", "Link to CBLAS library"), - "lapacke": (False, "clapack", "LAPACKE", "Link to LAPACKE library"), + # variant name #deflt #spack name #root var name #supporting versions #docstring + "blas": (False, "blas", "BLAS", "@3.0.00:", "Link to system BLAS"), + "lapack": (False, "lapack", "LAPACK", "@3.0.00:", "Link to system LAPACK"), + "mkl": (False, "mkl", "MKL", "@3.0.00:", "Link to system MKL"), + "cublas": (False, "cuda", None, "@3.0.00:", "Link to CUDA BLAS library"), + "cusparse": (False, "cuda", None, "@3.0.00:", "Link to CUDA sparse library"), + "superlu": (False, "superlu", "SUPERLU", "@3.1.00:", "Link to SuperLU library"), + "cblas": (False, "cblas", "CBLAS", "@3.1.00:", "Link to CBLAS library"), + "lapacke": (False, "clapack", "LAPACKE", "@3.1.00:", "Link to LAPACKE library"), + "rocblas": (False, "rocblas", "ROCBLAS", "@3.6.00:", "Link to AMD BLAS library"), + "rocsparse": (False, "rocsparse", "ROCSPARSE", "@3.6.00:", "Link to AMD sparse library"), } for tpl in tpls: - deflt_bool, spackname, rootname, descr = tpls[tpl] - variant(tpl, default=deflt_bool, description=descr) + deflt_bool, spackname, rootname, condition, descr = tpls[tpl] + variant(tpl, default=deflt_bool, when=f"{condition}", description=descr) depends_on(spackname, when="+%s" % tpl) variant("shared", default=True, description="Build shared libraries") @@ -174,7 +176,7 @@ class KokkosKernels(CMakePackage, CudaPackage): for tpl in self.tpls: on_flag = "+%s" % tpl off_flag = "~%s" % tpl - dflt, spackname, rootname, descr = self.tpls[tpl] + dflt, spackname, rootname, condition, descr = self.tpls[tpl] if on_flag in self.spec: options.append("-DKokkosKernels_ENABLE_TPL_%s=ON" % tpl.upper()) if rootname: |