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
39
40
41
42
43
44
|
# Copyright 2013-2020 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 import *
class Rocprim(CMakePackage):
""" Radeon Open Compute Parallel Primitives Library"""
homepage = "https://github.com/ROCmSoftwarePlatform/rocPRIM"
url = "https://github.com/ROCmSoftwarePlatform/rocPRIM/archive/rocm-3.5.0.tar.gz"
maintainers = ['srekolam', 'arjun-raj-kuppala']
version('3.7.0', sha256='225209a0cbd003c241821c8a9192cec5c07c7f1a6ab7da296305fc69f5f6d365')
version('3.5.0', sha256='29302dbeb27ae88632aa1be43a721f03e7e597c329602f9ca9c9c530c1def40d')
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
depends_on('cmake@3:', type='build')
depends_on('numactl', when='@3.7.0')
for ver in ['3.5.0', '3.7.0']:
depends_on('hip@' + ver, type='build', when='@' + ver)
depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver)
depends_on('comgr@' + ver, type='build', when='@' + ver)
depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver)
def setup_build_environment(self, env):
env.set('CXX', self.spec['hip'].hipcc)
def cmake_args(self):
spec = self.spec
args = [
'-DCMAKE_MODULE_PATH={0}/cmake'.format(spec['hip'].prefix),
'-DONLY_INSTALL=ON',
'-DBUILD_TEST=OFF',
'-DBUILD_BENCHMARK=OFF',
'-DBUILD_EXAMPLE=OFF'
]
return args
|