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>
This commit is contained in:
WuK 2022-06-30 07:39:39 +08:00 committed by GitHub
parent e6678e5f12
commit ec89ab1c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))]