From ec89ab1c276ea6589c3f3a848a9f944cef5c2ac8 Mon Sep 17 00:00:00 2001 From: WuK Date: Thu, 30 Jun 2022 07:39:39 +0800 Subject: 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> --- .../repos/builtin/packages/cutlass/package.py | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cutlass/package.py (limited to 'var') 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))] -- cgit v1.2.3-70-g09d2