diff options
8 files changed, 86 insertions, 29 deletions
diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index f781725cfd..6c2a23f1a2 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -14,10 +14,12 @@ class Hip(CMakePackage): single source code.""" homepage = "https://github.com/ROCm-Developer-Tools/HIP" - url = "https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-4.0.0.tar.gz" + git = "https://github.com/ROCm-Developer-Tools/HIP.git" + url = "https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-4.1.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='e21c10b62868ece7aa3c8413ec0921245612d16d86d81fe61797bf9a64bc37eb') version('4.0.0', sha256='d7b78d96cec67c55b74ea3811ce861b16d300410bc687d0629e82392e8d7c857') version('3.10.0', sha256='0082c402f890391023acdfd546760f41cb276dffc0ffeddc325999fd2331d4e8') version('3.9.0', sha256='25ad58691456de7fd9e985629d0ed775ba36a2a0e0b21c086bd96ba2fb0f7ed1') @@ -29,8 +31,8 @@ class Hip(CMakePackage): depends_on('perl@5.10:', type=('build', 'run')) depends_on('mesa18~llvm@18.3:') - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: - depends_on('hip-rocclr@' + ver, type='build', when='@' + ver) + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: + depends_on('hip-rocclr@' + ver, type=('build', 'run'), when='@' + ver) depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver) depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) depends_on('comgr@' + ver, type=('build', 'link', 'run'), when='@' + ver) @@ -59,7 +61,7 @@ class Hip(CMakePackage): # See https://github.com/ROCm-Developer-Tools/HIP/pull/2219 patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch', when='@3.7.0:3.9.0') - patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch', when='@3.10.0:4.0.0') + patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch', when='@3.10.0:4.1.0') def get_paths(self): if self.spec.external: @@ -82,7 +84,8 @@ class Hip(CMakePackage): 'llvm-amdgpu': rocm_prefix.llvm, 'hsa-rocr-dev': rocm_prefix.hsa, 'rocminfo': rocm_prefix, - 'rocm-device-libs': rocm_prefix + 'rocm-device-libs': rocm_prefix, + 'hip-rocclr': rocm_prefix } else: paths = { @@ -90,7 +93,8 @@ class Hip(CMakePackage): 'llvm-amdgpu': self.spec['llvm-amdgpu'].prefix, 'hsa-rocr-dev': self.spec['hsa-rocr-dev'].prefix, 'rocminfo': self.spec['rocminfo'].prefix, - 'rocm-device-libs': self.spec['rocm-device-libs'].prefix + 'rocm-device-libs': self.spec['rocm-device-libs'].prefix, + 'hip-rocclr': self.spec['hip-rocclr'].prefix } # `device_lib_path` is the path to the bitcode directory @@ -113,7 +117,11 @@ class Hip(CMakePackage): # hipcc recognizes HIP_PLATFORM == hcc and HIP_COMPILER == clang, even # though below we specified HIP_PLATFORM=rocclr and HIP_COMPILER=clang # in the CMake args. - env.set('HIP_PLATFORM', 'hcc') + if self.spec.satisfies('@:4.0.0'): + env.set('HIP_PLATFORM', 'hcc') + else: + env.set('HIP_PLATFORM', 'amd') + env.set('HIP_COMPILER', 'clang') # bin directory where clang++ resides @@ -142,6 +150,9 @@ class Hip(CMakePackage): # https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/rocm-4.0.0/lib/comgr/src/comgr-env.cpp env.set('LLVM_PATH', paths['llvm-amdgpu']) + if self.spec.satisfies('@4.1.0:'): + env.set('HIP_ROCCLR_HOME', paths['hip-rocclr']) + # Finally we have to set --rocm-path=<prefix> ourselves, which is not # the same as --hip-device-lib-path (set by hipcc). It's used to set # default bin, include and lib folders in clang. If it's not set it is @@ -185,10 +196,19 @@ class Hip(CMakePackage): with working_dir('bin'): match = '^#!/usr/bin/perl' substitute = "#!{perl}".format(perl=perl) - files = [ - 'hipify-perl', 'hipcc', 'extractkernel', - 'hipconfig', 'hipify-cmakefile' - ] + + if self.spec.satisfies('@:4.0.0'): + files = [ + 'hipify-perl', 'hipcc', 'extractkernel', + 'hipconfig', 'hipify-cmakefile' + ] + else: + files = [ + 'hipify-perl', 'hipcc', 'roc-obj-extract', + 'hipconfig', 'hipify-cmakefile', + 'roc-obj-ls' + ] + filter_file(match, substitute, *files, **kwargs) # This guy is used during the cmake phase, so we have to fix the @@ -215,10 +235,17 @@ class Hip(CMakePackage): def cmake_args(self): args = [ self.define('HIP_COMPILER', 'clang'), - self.define('HIP_PLATFORM', 'rocclr'), - self.define('HSA_PATH', self.spec['hsa-rocr-dev'].prefix), - self.define('HIP_RUNTIME', 'ROCclr'), + self.define('HSA_PATH', self.spec['hsa-rocr-dev'].prefix) ] + if self.spec.satisfies('@:4.0.0'): + args.append(self.define('HIP_RUNTIME', 'ROCclr')) + else: + args.append(self.define('HIP_RUNTIME', 'rocclr')) + + if self.spec.satisfies('@:4.0.0'): + args.append(self.define('HIP_PLATFORM', 'rocclr')) + else: + args.append(self.define('HIP_PLATFORM', 'amd')) # LIBROCclr_STATIC_DIR is unused from 3.6.0 and above if '@3.5.0' in self.spec: diff --git a/var/spack/repos/builtin/packages/hipfort/package.py b/var/spack/repos/builtin/packages/hipfort/package.py index 14b8a1cd18..89dce38d8b 100644 --- a/var/spack/repos/builtin/packages/hipfort/package.py +++ b/var/spack/repos/builtin/packages/hipfort/package.py @@ -10,10 +10,12 @@ class Hipfort(CMakePackage): """ Radeon Open Compute Parallel Primitives Library""" homepage = "https://github.com/ROCmSoftwarePlatform/hipfort" - url = "https://github.com/ROCmSoftwarePlatform/hipfort/archive/rocm-4.0.0.tar.gz" + git = "https://github.com/ROCmSoftwarePlatform/hipfort.git" + url = "https://github.com/ROCmSoftwarePlatform/hipfort/archive/rocm-4.1.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='2d335ae068d0cbb480575de7d3ea4868362af32cb195f911ee1aeced499f3974') version('4.0.0', sha256='a497645c33e0eff39abd5344756de63424733cde2837b7376c924b44ed5ae9c9') version('3.10.0', sha256='44173522d9eb2a18ec1cea2d9b00b237fe70501f0849bd6be3decbb73389487a') version('3.9.0', sha256='a3c4e125a9b56820446a65bd76b8caa196fddb0e0723eb513f0bcde9abd6a0c0') @@ -23,7 +25,7 @@ class Hipfort(CMakePackage): depends_on('cmake@3:', type='build') - for ver in ['3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('hip@' + ver, type='build', when='@' + ver) def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 37e9b20c69..0acfcf07c3 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -15,6 +15,7 @@ class MiopenHip(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='068b1bc33f90fe21d3aab5697d2b3b7b930e613c54d6c5ee820768579b2b41ee') version('4.0.0', sha256='84c6c17be9c1a9cd0d3a2af283433f64b07a4b9941349f498e40fed82fb205a6') version('3.10.0', sha256='926e43c5583cf70d6b247f9fe45971b8b1cc9668f9c8490c142c7e8b6e268f1a') version('3.9.0', sha256='f57d75a220c1094395cc1dccab2185c759d779751ddbb5369a6f041ec77b2156') @@ -34,7 +35,7 @@ class MiopenHip(CMakePackage): patch('0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch', when='@3.9.0:') - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('hip@' + ver, type='build', when='@' + ver) depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('comgr@' + ver, type='link', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/miopen-opencl/package.py b/var/spack/repos/builtin/packages/miopen-opencl/package.py index 49cff41d39..b1579b495d 100644 --- a/var/spack/repos/builtin/packages/miopen-opencl/package.py +++ b/var/spack/repos/builtin/packages/miopen-opencl/package.py @@ -11,10 +11,12 @@ class MiopenOpencl(CMakePackage): """AMD's library for high performance machine learning primitives.""" homepage = "https://github.com/ROCmSoftwarePlatform/MIOpen" + git = "https://github.com/ROCmSoftwarePlatform/MIOpen.git" url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-4.0.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='068b1bc33f90fe21d3aab5697d2b3b7b930e613c54d6c5ee820768579b2b41ee') version('4.0.0', sha256='84c6c17be9c1a9cd0d3a2af283433f64b07a4b9941349f498e40fed82fb205a6') version('3.10.0', sha256='926e43c5583cf70d6b247f9fe45971b8b1cc9668f9c8490c142c7e8b6e268f1a') version('3.9.0', sha256='f57d75a220c1094395cc1dccab2185c759d779751ddbb5369a6f041ec77b2156') @@ -32,7 +34,7 @@ class MiopenOpencl(CMakePackage): depends_on('half', type='build') depends_on('miopengemm@1.1.6', type='link', when='@3.5.0') - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('hip@' + ver, type='build', when='@' + ver) depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('comgr@' + ver, type='link', when='@' + ver) @@ -40,8 +42,10 @@ class MiopenOpencl(CMakePackage): depends_on('rocm-opencl@' + ver, type='build', when='@' + ver) depends_on('rocm-device-libs@' + ver, type='link', when='@' + ver) depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) - for ver in ['3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('miopengemm@' + ver, type='link', when='@' + ver) + for ver in ['4.1.0']: + depends_on('hip-rocclr@' + ver, type='link', when='@' + ver) def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/miopengemm/package.py b/var/spack/repos/builtin/packages/miopengemm/package.py index 8d922a7fac..5a7a823435 100644 --- a/var/spack/repos/builtin/packages/miopengemm/package.py +++ b/var/spack/repos/builtin/packages/miopengemm/package.py @@ -11,6 +11,7 @@ class Miopengemm(CMakePackage): and kernel generator""" homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM" + git = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM.git" url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-4.0.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] @@ -21,6 +22,7 @@ class Miopengemm(CMakePackage): url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-{0}.tar.gz" return url.format(version) + version('4.1.0', sha256='389328eb4a16565853691bd5b01a0eab978d99e3217329236ddc63a38b8dd4eb') version('4.0.0', sha256='366d03facb1ec5f6f4894aa88859df1d7fea00fee0cbac5173d7577e9a8ba799') version('3.10.0', sha256='66d844a17729ab25c1c2a243667d9714eb89fd51e42bfc014e2faf54a8642064') version('3.9.0', sha256='8e1273c35d50e9fd92e303d9bcbdd42ddbfda20844b3248428e16b54928f6dc2') @@ -34,6 +36,6 @@ class Miopengemm(CMakePackage): depends_on('rocm-cmake@3.5.0', type='build', when='@1.1.6') depends_on('rocm-opencl@3.5.0', type='build', when='@1.1.6') - for ver in ['3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('rocm-opencl@' + ver, type='build', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index 08c974c7fe..ab87cbdeae 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -11,10 +11,12 @@ class Rocblas(CMakePackage): """Radeon Open Compute BLAS library""" homepage = "https://github.com/ROCmSoftwarePlatform/rocBLAS/" - url = "https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-4.0.0.tar.gz" + git = "https://github.com/ROCmSoftwarePlatform/rocBLAS.git" + url = "https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-4.1.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='8be20c722bab169bc4badd79a9eab9a1aa338e0e5ff58ad85ba6bf09e8ac60f4') version('4.0.0', sha256='78e37a7597b581d90a29e4b956fa65d0f8d1c8fb51667906b5fe2a223338d401') version('3.10.0', sha256='9bfd0cf99662192b1ac105ab387531cfa9338ae615db80ed690c6a14d987e0e8') version('3.9.0', sha256='3ecd2d9fd2be0e1697a191d143a2d447b53a91ae01afb50231d591136ad5e2fe') @@ -28,15 +30,19 @@ class Rocblas(CMakePackage): depends_on('cmake@3:', type='build') - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver) depends_on('hip@' + ver, when='@' + ver) depends_on('comgr@' + ver, type='build', when='@' + ver) # used in Tensile - depends_on('rocm-smi@' + ver, type='build', when='@' + ver) depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver) + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + depends_on('rocm-smi@' + ver, type='build', when='@' + ver) + for ver in ['4.1.0']: + depends_on('hip-rocclr@' + ver, type='link', when='@' + ver) + # This is the default library format since 3.7.0 depends_on('msgpack-c@3:', when='@3.7:') @@ -77,6 +83,11 @@ class Rocblas(CMakePackage): commit='ab44bf46b609b5a40053f310bef2ab7511f726ae', when='@4.0.0') + resource(name='Tensile', + git='https://github.com/ROCmSoftwarePlatform/Tensile.git', + commit='d175277084d3253401583aa030aba121e8875bfd', + when='@4.1.0') + # Status: https://github.com/ROCmSoftwarePlatform/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087 # Not yet landed in 3.7.0, nor 3.8.0. patch('0001-Fix-compilation-error-with-StringRef-to-basic-string.patch', when='@:3.8') diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index 8f284b228c..b898aaeb0e 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -11,10 +11,12 @@ class Rocfft(CMakePackage): """Radeon Open Compute FFT library""" homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT/" - url = "https://github.com/ROCmSoftwarePlatform/rocfft/archive/rocm-4.0.0.tar.gz" + git = "https://github.com/ROCmSoftwarePlatform/rocFFT.git" + url = "https://github.com/ROCmSoftwarePlatform/rocfft/archive/rocm-4.1.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='df23fcb05aae72557461ae3687be7e3b8b78be4132daf1aa9dc07339f4eba0cc') version('4.0.0', sha256='d1d10d270f822e0bab64307313ef163ba449b058bf3352962bbb26d4f4db89d0') version('3.10.0', sha256='9f57226aac7d9a0515e14a5a5b08a85e727de72b3f9c2177daf56749ac2c76ae') version('3.9.0', sha256='9c9c0b7f09bab17250f5101d1605e7a61218eae828a3eb8fe048d607181294ce') @@ -34,11 +36,13 @@ class Rocfft(CMakePackage): depends_on('cmake@3:', type='build') - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver) depends_on('hip@' + ver, when='@' + ver) depends_on('comgr@' + ver, type=('build', 'link'), when='@' + ver) + for ver in ['4.1.0']: + depends_on('hip-rocclr@' + ver, when='@' + ver) def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) diff --git a/var/spack/repos/builtin/packages/rocm-tensile/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py index 484de03ef7..f9de247f57 100644 --- a/var/spack/repos/builtin/packages/rocm-tensile/package.py +++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py @@ -11,9 +11,11 @@ class RocmTensile(CMakePackage): """Radeon Open Compute Tensile library""" homepage = "https://github.com/ROCmSoftwarePlatform/Tensile/" - url = "https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-3.8.0.tar.gz" + git = "https://github.com/ROCmSoftwarePlatform/Tensile.git" + url = "https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-4.1.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('4.1.0', sha256='92b8ee13dfc11a67d5136227ee985622685790fd3f0f0e1ec6db411d4e9a3419') version('4.0.0', sha256='cf105ce8c3e352d19713b3bf8bda77f25c1a692c4f2ca82d631ba15523ecc1cd') version('3.10.0', sha256='8d5b50aadfa56a9195e4c387b8eb351c9b9b7671b136b624e07fe28db24bd330') version('3.9.0', sha256='17a011f8c3433d4f8c2dddabd5854cf96c406d24592b3942deb51672c570882e') @@ -31,22 +33,26 @@ class RocmTensile(CMakePackage): depends_on('msgpack-c@3:', when='@3.7:') depends_on('boost', type=('build', 'link')) - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0']: depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver) depends_on('hip@' + ver, when='@' + ver) depends_on('comgr@' + ver, type='build', when='@' + ver) # used in Tensile - depends_on('rocm-smi@' + ver, type='build', when='@' + ver) depends_on('rocm-smi-lib@' + ver, type='build', when='@' + ver) depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver + '+openmp') depends_on('llvm-amdgpu@' + ver + '~openmp', type='build', when='@' + ver + '~openmp') + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0']: + depends_on('rocm-smi@' + ver, type='build', when='@' + ver) + for ver in ['4.1.0']: + depends_on('hip-rocclr@' + ver, type='link', when='@' + ver) + root_cmakelists_dir = 'Tensile/Source' # Status: https://github.com/ROCmSoftwarePlatform/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087 # Not yet landed in 3.7.0, nor 3.8.0. patch('0001-fix-compile-error.patch', when='@3.7.0:3.8.0') - patch('0002-require-openmp-when-tensile-use-openmp-is-on.patch', when='@3.9.0:') + patch('0002-require-openmp-when-tensile-use-openmp-is-on.patch', when='@3.9.0:4.0.0') def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) |