Support 'spack external find' for rocm packages (#30792)
This commit is contained in:
parent
466572dc14
commit
6ac3186132
25 changed files with 328 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -16,6 +17,7 @@ class Comgr(CMakePackage):
|
|||
url = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['libamd_comgr']
|
||||
|
||||
version('master', branch='amd-stg-open')
|
||||
|
||||
|
@ -62,3 +64,15 @@ class Comgr(CMakePackage):
|
|||
depends_on('rocm-device-libs@' + ver, when='@{0} ^llvm-amdgpu ~rocm-device-libs'.format(ver))
|
||||
|
||||
root_cmakelists_dir = join_path('lib', 'comgr')
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from spack.hooks.sbang import filter_shebang
|
||||
from spack.package import *
|
||||
|
@ -20,6 +21,8 @@ class Hip(CMakePackage):
|
|||
url = "https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['libamdhip64']
|
||||
|
||||
version('master', branch='master')
|
||||
version('5.1.3', sha256='ce755ee6e407904eba3f6b3c9efcdd48eb4f58a26b06e1892166d05f19a75973')
|
||||
version('5.1.0', sha256='47e542183699f4005c48631d96f6a1fbdf27e07ad3402ccd7b5f707c2c602266')
|
||||
|
@ -197,6 +200,18 @@ def get_paths(self):
|
|||
|
||||
return paths
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def set_variables(self, env):
|
||||
# Note: do not use self.spec[name] here, since not all dependencies
|
||||
# have defined prefixes when hip is marked as external.
|
||||
|
|
|
@ -17,7 +17,7 @@ class Hipblas(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/hipBLAS/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['libhipblas.so']
|
||||
libraries = ['libhipblas']
|
||||
|
||||
version('5.1.3', sha256='f0fdaa851971b41b48ec2e7d640746fbd6f9f433da2020c5fd95c91a7473d9e1')
|
||||
version('5.1.0', sha256='22faba3828e50a4c4e22f569a7d6441c797a11db1d472619c01d3515a3275e92')
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -19,6 +21,7 @@ class Hipsolver(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/hipSOLVER/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam']
|
||||
libraries = ['libhipsolver']
|
||||
|
||||
version('5.1.3', sha256='96faa799a2db8078b72f9c3b5c199179875a7c20dc1064371b22a6a63397c145')
|
||||
version('5.1.0', sha256='697ba2b2814e7ac6f79680e6455b4b5e0def1bee2014b6940f47be7d13c0ae74')
|
||||
|
@ -40,6 +43,18 @@ class Hipsolver(CMakePackage):
|
|||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -15,6 +17,7 @@ class Hipsparse(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['libhipsparse']
|
||||
|
||||
version('5.1.3', sha256='6e6a0752654f0d391533df8cedf4b630a78ad34c99087741520c582963ce1602')
|
||||
version('5.1.0', sha256='f41329534f2ff477a0db6b7f77a72bb062f117800970c122d676db8b207ce80b')
|
||||
|
@ -52,6 +55,18 @@ class Hipsparse(CMakePackage):
|
|||
patch('e79985dccde22d826aceb3badfc643a3227979d2.patch', when='@3.5.0')
|
||||
patch('530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch', when='@3.5.0')
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
# Make sure find_package(HIP) finds the module.
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -20,6 +20,7 @@ class HsaRocrDev(CMakePackage):
|
|||
url = "https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['libhsa-runtime64']
|
||||
|
||||
version('master', branch='master')
|
||||
version('5.1.3', sha256='479340ec34cdffbbdb1002c85a47d1fccd23e8394631a1f001ef6130be08287d')
|
||||
|
@ -64,6 +65,18 @@ class HsaRocrDev(CMakePackage):
|
|||
|
||||
root_cmakelists_dir = 'src'
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -14,6 +16,7 @@ class Migraphx(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['libmigraphx']
|
||||
|
||||
version('5.1.3', sha256='686e068774500a46b6e6488370bbf5bd0bba6d19ecdb00636f951704d19c9ef2')
|
||||
version('5.1.0', sha256='6398efaef18a74f2a475aa21bd34bc7c077332a430ee3f6ba4fde6e6a6aa9f89')
|
||||
|
@ -75,6 +78,18 @@ def cmake_python_hints(self):
|
|||
self.define('Python_INCLUDE_DIR', python.package.config_vars['include'])
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
'-DCMAKE_CXX_COMPILER={0}/bin/clang++'
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.boost import Boost
|
||||
|
@ -16,6 +17,7 @@ class MiopenHip(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['libMIOpen']
|
||||
|
||||
version('5.1.3', sha256='510461f5c5bdbcf8dc889099d1e5960b9f84bd845a9fc9154588a9898c701c1d')
|
||||
version('5.1.0', sha256='bb50201334d68addf153b84b88ab803027c4913d71bdbda6f5ccde3f672f6fdd')
|
||||
|
@ -76,6 +78,18 @@ def get_bitcode_dir(self):
|
|||
else:
|
||||
return spec['llvm-amdgpu'].prefix.lib
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.boost import Boost
|
||||
|
@ -16,6 +17,7 @@ class MiopenOpencl(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['libMIOpen']
|
||||
|
||||
version('5.1.3', sha256='510461f5c5bdbcf8dc889099d1e5960b9f84bd845a9fc9154588a9898c701c1d')
|
||||
version('5.1.0', sha256='bb50201334d68addf153b84b88ab803027c4913d71bdbda6f5ccde3f672f6fdd')
|
||||
|
@ -64,6 +66,18 @@ class MiopenOpencl(CMakePackage):
|
|||
for ver in ['5.1.0', '5.1.3']:
|
||||
depends_on('mlirmiopen@' + ver, when='@' + ver)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('MIOPEN_BACKEND', 'OpenCL'),
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -16,6 +17,7 @@ class MiopenTensile(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/MIOpentensile/archive/rocm-5.0.0.tar.gz"
|
||||
|
||||
maintainers = ['srekolam']
|
||||
libraries = ['libMIOpenTensile']
|
||||
|
||||
version('5.1.0', sha256='f1ae57bd4df8c154357b3f17caf0cfd5f80ba16ffff67bf6219a56f1eb5f897d')
|
||||
version('5.0.2', sha256='7b85a6a37d0905b0a3baa8361fd71a5a32ad90f3a562fd5e1af7e2ba68099fa6')
|
||||
|
@ -54,6 +56,18 @@ class MiopenTensile(CMakePackage):
|
|||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
arch = self.spec.variants['tensile_architecture'].value
|
||||
tensile_path = join_path(self.stage.source_path, 'Tensile')
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -15,6 +17,7 @@ class Miopengemm(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['libmiopengemm']
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version == Version('1.1.6'):
|
||||
|
@ -50,3 +53,15 @@ def url_for_version(self, version):
|
|||
'5.0.2', '5.1.0', '5.1.3']:
|
||||
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
|
||||
depends_on('rocm-opencl@' + ver, when='@' + ver)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
|
|
@ -19,7 +19,7 @@ class Rccl(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rccl/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librccl.so']
|
||||
libraries = ['librccl']
|
||||
|
||||
version('5.1.3', sha256='56491257f27b48bf85f4b91434a2a6e49a448337c889db181b02c8a4a260a4bc')
|
||||
version('5.1.0', sha256='02b0180857e615326f9cab775573436b9162899ad8e526830f54392b8a51b1f5')
|
||||
|
|
|
@ -14,6 +14,7 @@ class Rdc(CMakePackage):
|
|||
url = "https://github.com/RadeonOpenCompute/rdc/archive/rocm-4.3.0.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librdc']
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version == Version('3.9.0'):
|
||||
|
@ -61,6 +62,18 @@ def patch(self):
|
|||
'{0}/bin/protoc'.format(self.spec['protobuf'].prefix),
|
||||
'CMakeLists.txt', string=True)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
rpath = self.rpath
|
||||
rpath.append(self.prefix.opt.rocm.rdc.lib)
|
||||
|
|
|
@ -21,6 +21,7 @@ class Rocalution(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rocALUTION/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocalution_hip']
|
||||
|
||||
version('5.1.3', sha256='7febe8179f120cbe58ea255bc233ad5d1b4c106f3934eb8e670135a8b7bd09c7')
|
||||
version('5.1.0', sha256='d9122189103ebafe7ec5aeb50e60f3e02af5c2747021f9071aab91e7f875c29e')
|
||||
|
@ -83,6 +84,18 @@ def patch(self):
|
|||
files = ['hip_rand_normal.hpp', 'hip_rand_uniform.hpp']
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('CMAKE_MODULE_PATH', self.spec['hip'].prefix.cmake),
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -15,6 +16,7 @@ class Rocblas(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['librocblas']
|
||||
|
||||
version('5.1.3', sha256='915374431db8f0cecdc2bf318a0ad33c3a8eceedc461d7a06b92ccb02b07313c')
|
||||
version('5.1.0', sha256='efa0c424b5ada697314aa8a78c19c93ade15f1612c4bfc8c53d71d1c9719aaa3')
|
||||
|
@ -126,6 +128,18 @@ def check(self):
|
|||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('BUILD_CLIENTS_TESTS',
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -15,6 +16,7 @@ class Rocfft(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rocfft/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['librocfft']
|
||||
|
||||
version('5.1.3', sha256='b4fcd03c1b07d465bb307ec33cc7fb50036dff688e497c5e52b2dec37f4cb618')
|
||||
version('5.1.0', sha256='dc11c9061753ae43a9d5db9c4674aa113a8adaf50818b2701cbb940894147f68')
|
||||
|
@ -70,6 +72,18 @@ def check(self):
|
|||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('BUILD_CLIENTS_TESTS', self.run_tests),
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -18,6 +19,7 @@ class RocmDbgapi(CMakePackage):
|
|||
url = "https://github.com/ROCm-Developer-Tools/ROCdbgapi/archive/rocm-5.0.0.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocm-dbgapi']
|
||||
|
||||
version('master', branch='amd-master')
|
||||
version('5.1.3', sha256='880f80ebf741e3451676837f720551e02cffd0b9346ca4dfa6cf7f7043282f2b')
|
||||
|
@ -47,6 +49,18 @@ class RocmDbgapi(CMakePackage):
|
|||
depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver)
|
||||
depends_on('comgr@' + ver, type=('build', 'link'), when='@' + ver)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def patch(self):
|
||||
filter_file(r'(<INSTALL_INTERFACE:include>)', r'\1 {0}/include'.
|
||||
format(self.spec['hsa-rocr-dev'].prefix), 'CMakeLists.txt')
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -15,6 +16,7 @@ class RocmDebugAgent(CMakePackage):
|
|||
url = "https://github.com/ROCm-Developer-Tools/rocr_debug_agent/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocm-debug-agent']
|
||||
|
||||
version('5.1.3', sha256='ef26130829f3348d503669467ab1ea39fb67d943d88d64e7ac04b9617ec6067d')
|
||||
version('5.1.0', sha256='e0ceeef575d8645385bc6e4c9c3accaa192a93c42d83545cf5626c848f59806b')
|
||||
|
@ -62,6 +64,18 @@ def url_for_version(self, version):
|
|||
patch('0001-Drop-overly-strict-Werror-flag.patch', when='@3.7.0:')
|
||||
patch('0002-add-hip-architecture.patch', when='@3.9.0:')
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
@property
|
||||
def root_cmakelists_dir(self):
|
||||
if '@3.5.0' in self.spec:
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -13,6 +15,7 @@ class RocmOpencl(CMakePackage):
|
|||
git = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['libOpenCL']
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version == Version('3.5.0'):
|
||||
|
@ -74,6 +77,18 @@ def url_for_version(self, version):
|
|||
depends_on('comgr@' + ver, type='build', when='@' + ver)
|
||||
depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
# The includes are messed up in ROCm 3.5.0:
|
||||
# ROCM-OpenCL-Runtime uses flat includes
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
|
||||
from spack.package import *
|
||||
|
@ -19,6 +20,7 @@ class RocmSmiLib(CMakePackage):
|
|||
url = "https://github.com/RadeonOpenCompute/rocm_smi_lib/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocm_smi64']
|
||||
|
||||
version('master', branch='master')
|
||||
version('5.1.3', sha256='8a19ce60dc9221545aa50e83e88d8c4be9bf7cde2425cefb13710131dc1d7b1b')
|
||||
|
@ -51,6 +53,18 @@ def cmake_args(self):
|
|||
self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
@run_after('install')
|
||||
def post_install(self):
|
||||
shutil.rmtree(self.prefix.lib)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -15,6 +16,7 @@ class RocprofilerDev(CMakePackage):
|
|||
url = "https://github.com/ROCm-Developer-Tools/rocprofiler/archive/refs/tags/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocprofiler64']
|
||||
|
||||
version('5.1.3', sha256='eca7be451c7bf000fd9c75683e7f5dfbed32dbb385b5ac685d2251ee8c3abc96')
|
||||
version('5.1.0', sha256='4a1c6ed887b0159392406af8796508df2794353a4c3aacc801116044fb4a10a5')
|
||||
|
@ -54,6 +56,18 @@ def patch(self):
|
|||
'${HSA_RUNTIME_LIB_PATH}/../include ${HSA_KMT_LIB_PATH}/..\
|
||||
/include', 'test/CMakeLists.txt', string=True)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
self.define(
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -18,6 +19,7 @@ class Rocrand(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rocRAND/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocrand']
|
||||
|
||||
version('5.1.3', sha256='4a19e1bcb60955a02a73ad64594c23886d6749afe06b0104e2b877dbe02c8d1c')
|
||||
version('5.1.0', sha256='0c6f114a775d0b38be71f3f621a10bde2104a1f655d5d68c5fecb79b8b51a815')
|
||||
|
@ -120,6 +122,18 @@ def fix_library_locations(self):
|
|||
os.symlink(join_path('../../include/hiprand',
|
||||
header_file), header_file)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('BUILD_BENCHMARK', 'OFF'),
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import itertools
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -17,6 +18,7 @@ class Rocsolver(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rocSOLVER/archive/rocm-5.0.2.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
||||
libraries = ['librocsolver']
|
||||
|
||||
amdgpu_targets = (
|
||||
'gfx803', 'gfx900', 'gfx906:xnack-', 'gfx908:xnack-',
|
||||
|
@ -69,6 +71,18 @@ def check(self):
|
|||
when='@{0} amdgpu_target={1}'.format(ver, tgt))
|
||||
depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import itertools
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -20,6 +21,7 @@ class Rocsparse(CMakePackage):
|
|||
url = "https://github.com/ROCmSoftwarePlatform/rocSPARSE/archive/rocm-5.0.0.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['librocsparse']
|
||||
|
||||
amdgpu_targets = ('gfx803', 'gfx900:xnack-', 'gfx906:xnack-', 'gfx908:xnack-',
|
||||
'gfx90a:xnack-', 'gfx90a:xnack+',
|
||||
|
@ -59,6 +61,18 @@ class Rocsparse(CMakePackage):
|
|||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -17,6 +18,7 @@ class RoctracerDev(CMakePackage):
|
|||
url = "https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-5.1.3.tar.gz"
|
||||
|
||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||
libraries = ['libroctracer64']
|
||||
|
||||
version('5.1.3', sha256='45f19875c15eb609b993788b47fd9c773b4216074749d7744f3a671be17ef33c')
|
||||
version('5.1.0', sha256='58b535f5d6772258190e4adcc23f37c916f775057a91b960e1f2ee1f40ed5aac')
|
||||
|
@ -54,6 +56,18 @@ class RoctracerDev(CMakePackage):
|
|||
'5.1.0', '5.1.3']:
|
||||
depends_on('rocprofiler-dev@' + ver, when='@' + ver)
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)',
|
||||
lib)
|
||||
if match:
|
||||
ver = '{0}.{1}.{2}'.format(int(match.group(1)),
|
||||
int(match.group(2)),
|
||||
int(match.group(3)))
|
||||
else:
|
||||
ver = None
|
||||
return ver
|
||||
|
||||
def setup_build_environment(self, build_env):
|
||||
spec = self.spec
|
||||
build_env.set("HIP_PATH", spec['hip'].prefix)
|
||||
|
|
Loading…
Reference in a new issue