summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuK <i@wu-kan.cn>2022-06-30 07:39:39 +0800
committerGitHub <noreply@github.com>2022-06-29 16:39:39 -0700
commitec89ab1c276ea6589c3f3a848a9f944cef5c2ac8 (patch)
tree53717612d6eb96923be4867a585a92ebb5a5fa8d
parente6678e5f12ec5c7148cf2872b9f4c6a070f1a067 (diff)
downloadspack-ec89ab1c276ea6589c3f3a848a9f944cef5c2ac8.tar.gz
spack-ec89ab1c276ea6589c3f3a848a9f944cef5c2ac8.tar.bz2
spack-ec89ab1c276ea6589c3f3a848a9f944cef5c2ac8.tar.xz
spack-ec89ab1c276ea6589c3f3a848a9f944cef5c2ac8.zip
cutlass: new package (#31379)
* cutlass: new package * cutlass: fix ci * cutlass: remove `join_path` Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> * cutlass: adding a message for cuda_arch Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> * cutlass: simplify cmake_args Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> * cutlass: fix cmake_args Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/cutlass/package.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cutlass/package.py b/var/spack/repos/builtin/packages/cutlass/package.py
new file mode 100644
index 0000000000..c2f837e727
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cutlass/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class Cutlass(CMakePackage, CudaPackage):
+ """CUDA Templates for Linear Algebra Subroutines"""
+
+ homepage = "https://github.com/NVIDIA/cutlass"
+ git = homepage + ".git"
+ url = "https://github.com/NVIDIA/cutlass/archive/refs/tags/v2.9.0.tar.gz"
+
+ version('master', branch='master')
+ version(
+ '2.9.1', sha256="2d6474576c08ee21d7f4f3a10fd1a47234fd9fd638efc8a2e0e64bb367f09bc1")
+ version(
+ '2.9.0', sha256="ccca4685739a3185e3e518682845314b07a5d4e16d898b10a3c3a490fd742fb4")
+ variant('cuda', default=True, description='Build with CUDA')
+ conflicts('~cuda', msg='Cutlass requires CUDA')
+ conflicts('cuda_arch=none',
+ msg='Must specify CUDA compute capabilities of your GPU, see '
+ 'https://developer.nvidia.com/cuda-gpus')
+
+ def setup_build_environment(self, env):
+ env.set('CUDACXX', self.spec["cuda"].prefix.bin.nvcc)
+
+ def cmake_args(self):
+ cuda_arch = self.spec.variants['cuda_arch'].value
+ return [self.define("CUTLASS_NVCC_ARCHS", ";".join(cuda_arch))]