2022-01-12 11:21:41 -08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2020-08-20 21:55:02 +02:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
|
|
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Hipsparse(CMakePackage):
|
|
|
|
|
"""hipSPARSE is a SPARSE marshalling library, with
|
|
|
|
|
multiple supported backends"""
|
|
|
|
|
|
|
|
|
|
homepage = "https://github.com/ROCmSoftwarePlatform/hipSPARSE"
|
|
|
|
|
git = "https://github.com/ROCmSoftwarePlatform/hipSPARSE.git"
|
2022-01-15 21:29:15 +05:30
|
|
|
url = "https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-4.5.0.tar.gz"
|
2020-08-20 21:55:02 +02:00
|
|
|
|
2021-06-17 11:52:33 +02:00
|
|
|
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
2020-08-20 21:55:02 +02:00
|
|
|
|
2022-01-15 21:29:15 +05:30
|
|
|
version('4.5.2', sha256='81ca24491fbf2bc8e5aa477a6c38776877579ac9f4241ddadeca76a579a7ebb5')
|
2022-01-06 13:24:00 -08:00
|
|
|
version('4.5.0', sha256='1049c490fc2008d701a16d14e11004e3bc5b4da993aa48b117e3c44be5677e3c')
|
2021-09-03 06:25:31 -07:00
|
|
|
version('4.3.1', sha256='e5757b5213b880237ae0f24616088f79c449c2955cf2133642dbbc9c655f4691')
|
2021-08-12 01:17:03 -07:00
|
|
|
version('4.3.0', sha256='194fbd589ce34471f3255f71ea5fca2d27bee47a464558a86d0713b4d26237ea')
|
2021-05-20 06:55:16 -04:00
|
|
|
version('4.2.0', sha256='cdedf3766c10200d3ebabe86cbb9c0fe6504e4b3317dccca289327d7c189bb3f')
|
2021-04-07 16:55:20 -04:00
|
|
|
version('4.1.0', sha256='66710c390489922f0bd1ac38fd8c32fcfb5b7760b92c2d282f7d1abf214742ee')
|
2021-01-05 04:32:03 +05:30
|
|
|
version('4.0.0', sha256='fc3736b2ea203209021616b2ffbcdd664781d692b07b8e8bb7f78b42dabbd5e5')
|
2020-12-03 17:10:54 +05:30
|
|
|
version('3.10.0', sha256='7fd863ebf6eed09325c23ba06d9008b2f2c1345283d1a331e329e1a512b602f7')
|
2020-11-13 10:34:19 +05:30
|
|
|
version('3.9.0', sha256='ab0ea3dd9b68a126291ed5a35e50fc85d0aeb35fe862f5d9e544435e4262c435')
|
ROCm3.8 hipcub, hipsparse, rocprim, rocsparse & rocthrust (#18936)
* ROCm3.8 atmi, hipify-clang, rocm-clang-ocl, rocm-dbgapi, rocprofiler
* ROCm3.8 hipcub, hipsparse, rocprim, rocsparse & rocthrust
* review comments
* Review comments
Co-authored-by: root <root@mlseqa-hyd-virt-srv-07.amd.com>
2020-09-28 21:40:34 +05:30
|
|
|
version('3.8.0', sha256='8874c100e9ba54587a6057c2a0e555a0903254a16e9e01c2385bae1b027f83b5')
|
2020-09-10 15:33:21 -07:00
|
|
|
version('3.7.0', sha256='a2f02d8fc6ad9a561f06dacde54ecafd30563c5c95f93819a5694e5b650dad7f')
|
2020-08-20 21:55:02 +02:00
|
|
|
version('3.5.0', sha256='fa16b2a307a5d9716066c2876febcbc1cef855bf0c96d235d2d8f2206a0fb69d')
|
|
|
|
|
|
2021-10-26 12:18:38 -07:00
|
|
|
variant('build_type', default='Release', values=("Release", "Debug", "RelWithDebInfo"), description='CMake build type')
|
|
|
|
|
|
2020-09-10 15:33:21 -07:00
|
|
|
depends_on('cmake@3:', type='build')
|
2020-08-20 21:55:02 +02:00
|
|
|
depends_on('git', type='build')
|
|
|
|
|
|
2021-05-20 06:55:16 -04:00
|
|
|
for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0',
|
2022-01-15 21:29:15 +05:30
|
|
|
'4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2']:
|
2020-09-10 15:33:21 -07:00
|
|
|
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
|
2021-06-17 11:52:33 +02:00
|
|
|
depends_on('hip@' + ver, when='@' + ver)
|
|
|
|
|
depends_on('rocsparse@' + ver, when='@' + ver)
|
2021-09-03 06:25:31 -07:00
|
|
|
for ver in ['3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0',
|
2022-01-15 21:29:15 +05:30
|
|
|
'4.3.0', '4.3.1', '4.5.0', '4.5.2']:
|
2021-06-17 11:52:33 +02:00
|
|
|
depends_on('rocprim@' + ver, when='@' + ver)
|
|
|
|
|
|
2020-09-10 15:33:21 -07:00
|
|
|
patch('e79985dccde22d826aceb3badfc643a3227979d2.patch', when='@3.5.0')
|
|
|
|
|
patch('530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch', when='@3.5.0')
|
2020-08-20 21:55:02 +02:00
|
|
|
|
|
|
|
|
def cmake_args(self):
|
2021-08-11 08:21:17 +02:00
|
|
|
args = [
|
2021-08-13 12:08:25 -07:00
|
|
|
# Make sure find_package(HIP) finds the module.
|
|
|
|
|
self.define('CMAKE_MODULE_PATH', self.spec['hip'].prefix.cmake),
|
2021-06-17 11:52:33 +02:00
|
|
|
self.define('CMAKE_CXX_STANDARD', '14'),
|
|
|
|
|
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
|
|
|
|
self.define('BUILD_CLIENTS_TESTS', 'OFF'),
|
2020-08-20 21:55:02 +02:00
|
|
|
]
|
|
|
|
|
|
2021-09-30 16:01:17 +02:00
|
|
|
if self.spec.satisfies('^cmake@3.21.0:3.21.2'):
|
2021-08-11 08:21:17 +02:00
|
|
|
args.append(self.define('__skip_rocmclang', 'ON'))
|
|
|
|
|
|
|
|
|
|
return args
|
|
|
|
|
|
2020-08-20 21:55:02 +02:00
|
|
|
def setup_build_environment(self, env):
|
|
|
|
|
env.set('CXX', self.spec['hip'].hipcc)
|