summaryrefslogtreecommitdiff
blob: d85941a8c5e4fe77ae58dcaeca67868bdc3f3e14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cuda cmake

DESCRIPTION="CUDA Templates for Linear Algebra Subroutines"
HOMEPAGE="https://github.com/NVIDIA/cutlass"
SRC_URI="https://github.com/NVIDIA/${PN}/archive/refs/tags/v${PV}.tar.gz
	-> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"

BDEPEND="dev-util/nvidia-cuda-toolkit"

src_prepare() {
	cmake_src_prepare
	cuda_src_prepare
}

src_configure() {
	mycmakeargs+=(
		-DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")"
		-DCUTLASS_ENABLE_HEADERS_ONLY=yes
		-DCUTLASS_ENABLE_TESTS=no
	)
	cuda_add_sandbox -w
	addpredict /dev/char
	cmake_src_configure
}

src_install() {
	cmake_src_install
	rm -r "${ED}"/usr/test || die
}