2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2020-08-21 03:55:02 +08: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-03-26 01:56:52 +08:00
|
|
|
url = "https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-5.0.0.tar.gz"
|
2020-08-21 03:55:02 +08:00
|
|
|
|
2021-06-17 17:52:33 +08:00
|
|
|
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
2020-08-21 03:55:02 +08:00
|
|
|
|
2022-05-10 23:42:22 +08:00
|
|
|
version('5.1.0', sha256='f41329534f2ff477a0db6b7f77a72bb062f117800970c122d676db8b207ce80b')
|
2022-03-26 01:56:52 +08:00
|
|
|
version('5.0.2', sha256='a266e8b3bbdea04617260f51b3d85cc672af6ca417cae0812d04fd9702429c47')
|
|
|
|
version('5.0.0', sha256='0a1754508e06d3a6b17593a71a3c57a3e25d3b46d88573098fda11442853196c')
|
2022-01-15 23:59:15 +08:00
|
|
|
version('4.5.2', sha256='81ca24491fbf2bc8e5aa477a6c38776877579ac9f4241ddadeca76a579a7ebb5')
|
2022-01-07 05:24:00 +08:00
|
|
|
version('4.5.0', sha256='1049c490fc2008d701a16d14e11004e3bc5b4da993aa48b117e3c44be5677e3c')
|
2022-05-18 05:11:32 +08:00
|
|
|
version('4.3.1', sha256='e5757b5213b880237ae0f24616088f79c449c2955cf2133642dbbc9c655f4691', deprecated=True)
|
|
|
|
version('4.3.0', sha256='194fbd589ce34471f3255f71ea5fca2d27bee47a464558a86d0713b4d26237ea', deprecated=True)
|
|
|
|
version('4.2.0', sha256='cdedf3766c10200d3ebabe86cbb9c0fe6504e4b3317dccca289327d7c189bb3f', deprecated=True)
|
2022-01-17 20:08:24 +08:00
|
|
|
version('4.1.0', sha256='66710c390489922f0bd1ac38fd8c32fcfb5b7760b92c2d282f7d1abf214742ee', deprecated=True)
|
|
|
|
version('4.0.0', sha256='fc3736b2ea203209021616b2ffbcdd664781d692b07b8e8bb7f78b42dabbd5e5', deprecated=True)
|
|
|
|
version('3.10.0', sha256='7fd863ebf6eed09325c23ba06d9008b2f2c1345283d1a331e329e1a512b602f7', deprecated=True)
|
|
|
|
version('3.9.0', sha256='ab0ea3dd9b68a126291ed5a35e50fc85d0aeb35fe862f5d9e544435e4262c435', deprecated=True)
|
|
|
|
version('3.8.0', sha256='8874c100e9ba54587a6057c2a0e555a0903254a16e9e01c2385bae1b027f83b5', deprecated=True)
|
|
|
|
version('3.7.0', sha256='a2f02d8fc6ad9a561f06dacde54ecafd30563c5c95f93819a5694e5b650dad7f', deprecated=True)
|
|
|
|
version('3.5.0', sha256='fa16b2a307a5d9716066c2876febcbc1cef855bf0c96d235d2d8f2206a0fb69d', deprecated=True)
|
2020-08-21 03:55:02 +08:00
|
|
|
|
2021-10-27 03:18:38 +08:00
|
|
|
variant('build_type', default='Release', values=("Release", "Debug", "RelWithDebInfo"), description='CMake build type')
|
|
|
|
|
rocmlibs: relax rocm-cmake version requirements (#29857)
* rocmlibs: relax rocm-cmake version requirements
The rocm-cmake modules tend to be backwards-compatible, to the extent
that most ROCm math libraries were built using rocm-cmake@master
for a long while without anybody noticing. (That was fixed in
97f0c3ccd9f0a40896998a7580150a514ec3bc37.)
Some packages, like comgr, barely use rocm-cmake for anything, and
we can easily set a very minimal version requirement. For most
packages, however, it would be a lot of effort to determine the
minimum rocm-cmake version required for each release. For those
packages, I just turned the exact version requirement into a
minimum version requirement.
Since I was looking through the CMakeLists.txt for a large number of
libraries, I also took note of the cmake_minimum_required and adjusted
the cmake minimum requirements to match.
* Add rocblas build dependency to hipblas
The rocblas library is required both for both building and linking
hipblas.
* Remove rocm-cmake from vtk-m dependency list
The rocm-cmake package provides CMake scripts that facilitate common
build configuration tasks in the ROCm libraries. It is never needed at
link-time. Also, there are no calls to find_package(ROCM) or
include(ROCM.*)in vtk-m, so this dependency will never be used.
2022-04-19 21:26:40 +08:00
|
|
|
depends_on('cmake@3.5:', type='build')
|
2020-08-21 03:55:02 +08:00
|
|
|
depends_on('git', type='build')
|
|
|
|
|
2021-05-20 18:55:16 +08: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-03-26 01:56:52 +08:00
|
|
|
'4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0',
|
2022-05-10 23:42:22 +08:00
|
|
|
'5.0.2', '5.1.0']:
|
rocmlibs: relax rocm-cmake version requirements (#29857)
* rocmlibs: relax rocm-cmake version requirements
The rocm-cmake modules tend to be backwards-compatible, to the extent
that most ROCm math libraries were built using rocm-cmake@master
for a long while without anybody noticing. (That was fixed in
97f0c3ccd9f0a40896998a7580150a514ec3bc37.)
Some packages, like comgr, barely use rocm-cmake for anything, and
we can easily set a very minimal version requirement. For most
packages, however, it would be a lot of effort to determine the
minimum rocm-cmake version required for each release. For those
packages, I just turned the exact version requirement into a
minimum version requirement.
Since I was looking through the CMakeLists.txt for a large number of
libraries, I also took note of the cmake_minimum_required and adjusted
the cmake minimum requirements to match.
* Add rocblas build dependency to hipblas
The rocblas library is required both for both building and linking
hipblas.
* Remove rocm-cmake from vtk-m dependency list
The rocm-cmake package provides CMake scripts that facilitate common
build configuration tasks in the ROCm libraries. It is never needed at
link-time. Also, there are no calls to find_package(ROCM) or
include(ROCM.*)in vtk-m, so this dependency will never be used.
2022-04-19 21:26:40 +08:00
|
|
|
depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver)
|
|
|
|
depends_on('hip@' + ver, when='@' + ver)
|
|
|
|
depends_on('rocsparse@' + ver, when='@' + ver)
|
2021-09-03 21:25:31 +08:00
|
|
|
for ver in ['3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0',
|
2022-05-10 23:42:22 +08:00
|
|
|
'4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0', '5.0.2',
|
|
|
|
'5.1.0']:
|
2021-06-17 17:52:33 +08:00
|
|
|
depends_on('rocprim@' + ver, when='@' + ver)
|
|
|
|
|
2020-09-11 06:33:21 +08:00
|
|
|
patch('e79985dccde22d826aceb3badfc643a3227979d2.patch', when='@3.5.0')
|
|
|
|
patch('530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch', when='@3.5.0')
|
2020-08-21 03:55:02 +08:00
|
|
|
|
|
|
|
def cmake_args(self):
|
2021-08-11 14:21:17 +08:00
|
|
|
args = [
|
2021-08-14 03:08:25 +08:00
|
|
|
# Make sure find_package(HIP) finds the module.
|
|
|
|
self.define('CMAKE_MODULE_PATH', self.spec['hip'].prefix.cmake),
|
2021-06-17 17:52:33 +08:00
|
|
|
self.define('CMAKE_CXX_STANDARD', '14'),
|
|
|
|
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
|
|
|
self.define('BUILD_CLIENTS_TESTS', 'OFF'),
|
2020-08-21 03:55:02 +08:00
|
|
|
]
|
|
|
|
|
2021-09-30 22:01:17 +08:00
|
|
|
if self.spec.satisfies('^cmake@3.21.0:3.21.2'):
|
2021-08-11 14:21:17 +08:00
|
|
|
args.append(self.define('__skip_rocmclang', 'ON'))
|
|
|
|
|
|
|
|
return args
|
|
|
|
|
2020-08-21 03:55:02 +08:00
|
|
|
def setup_build_environment(self, env):
|
|
|
|
env.set('CXX', self.spec['hip'].hipcc)
|