diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2020-09-03 02:50:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 19:50:05 -0500 |
commit | 6d87cbdb524c0fad2100f8fa15b0c76dce432750 (patch) | |
tree | dfe0c28959d93d0447720f2bc56211e37c8ce673 | |
parent | 443407cda545e31d33c9d5abac393c8ac8ad33a2 (diff) | |
download | spack-6d87cbdb524c0fad2100f8fa15b0c76dce432750.tar.gz spack-6d87cbdb524c0fad2100f8fa15b0c76dce432750.tar.bz2 spack-6d87cbdb524c0fad2100f8fa15b0c76dce432750.tar.xz spack-6d87cbdb524c0fad2100f8fa15b0c76dce432750.zip |
Add rocm 3.7.0 libs (#18366)
* Add rocm 3.7.0 libs
* Make 3.7.0-only dependency on numactl explicit
* Add rocm-device-libs dep to rocm-clang-ocl
* Update the cmakelists dir in rocm-debug-agant
* Make rocm-debug-agent work on 3.7.0
* Disable tensile host; following rocm-arch recommendations
18 files changed, 212 insertions, 46 deletions
diff --git a/var/spack/repos/builtin/packages/comgr/package.py b/var/spack/repos/builtin/packages/comgr/package.py index 04af80ada6..0a9f282cee 100644 --- a/var/spack/repos/builtin/packages/comgr/package.py +++ b/var/spack/repos/builtin/packages/comgr/package.py @@ -16,13 +16,14 @@ class Comgr(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='73e56ec3c63dade24ad351e9340e2f8e127694028c1fb7cec5035376bf098432') version('3.5.0', sha256='25c963b46a82d76d55b2302e0e18aac8175362656a465549999ad13d07b689b9') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + for ver in ['3.5.0', '3.7.0']: depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver) depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver) depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index fde1b58de5..0c0029ab27 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -17,11 +17,14 @@ class Hip(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='757b392c3beb29beea27640832fbad86681dbd585284c19a4c2053891673babd') version('3.5.0', sha256='ae8384362986b392288181bcfbe5e3a0ec91af4320c189bd83c844ed384161b3') depends_on('cmake@3:', type='build') depends_on('perl@5.10:', type=('build', 'run')) - for ver in ['3.5.0']: + depends_on('mesa~llvm@18.3:') + + for ver in ['3.5.0', '3.7.0']: depends_on('rocclr@' + ver, type='build', when='@' + ver) depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver) depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) @@ -29,7 +32,9 @@ class Hip(CMakePackage): depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver) depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver) depends_on('rocminfo@' + ver, type='build', when='@' + ver) - depends_on('mesa~llvm@18.3:', type=('build', 'link'), when='@' + ver) + + # Notice: most likely this will only be a hard dependency on 3.7.0 + depends_on('numactl', when='@3.7.0') # Note: the ROCm ecosystem expects `lib/` and `bin/` folders with symlinks # in the parent directory of the package, which is incompatible with spack. @@ -37,10 +42,10 @@ class Hip(CMakePackage): # of the package. With the following patch we should never hit code that # uses the ROCM_PATH variable again; just to be sure we set it to an empty # string. - patch('0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch', when='@3.5.0') + patch('0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch', when='@3.5.0:') # See https://github.com/ROCm-Developer-Tools/HIP/pull/2141 - patch('0002-Fix-detection-of-HIP_CLANG_ROOT.patch', when='@3.5.0') + patch('0002-Fix-detection-of-HIP_CLANG_ROOT.patch', when='@3.5.0:') def setup_dependent_build_environment(self, env, dependent_spec): env.set('ROCM_PATH', '') @@ -60,6 +65,13 @@ class Hip(CMakePackage): 'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"', 'hip-config.cmake.in', string=True) + def flag_handler(self, name, flags): + if name == 'cxxflags' and '@3.7.0' in self.spec: + incl = self.spec['rocclr'].prefix.include + flags.append('-I {0}/compiler/lib/include'.format(incl)) + + return (flags, None, None) + @run_before('install') def filter_sbang(self): perl = self.spec['perl'].command diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch b/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch new file mode 100644 index 0000000000..58fd1e8cd9 --- /dev/null +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch @@ -0,0 +1,26 @@ +From b5a49e6de81e7a6cba86694ee5ba2486cd999976 Mon Sep 17 00:00:00 2001 +From: Harmen Stoppels <harmenstoppels@gmail.com> +Date: Fri, 28 Aug 2020 18:26:54 +0200 +Subject: [PATCH] Remove explicit RPATH again + +--- + src/CMakeLists.txt | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9de7842..66c6880 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -134,9 +134,6 @@ target_include_directories( ${CORE_RUNTIME_TARGET} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/libamdhsacode ) + +-## Set RUNPATH - ../../lib covers use of the legacy symlink in /hsa/lib/ +-set_property(TARGET ${CORE_RUNTIME_TARGET} PROPERTY INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64" ) +- + ## ------------------------- Linux Compiler and Linker options ------------------------- + set ( HSA_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=missing-braces -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function ) + +-- +2.25.1 + diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index c1bc00b66a..0f3796f8f5 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -18,21 +18,29 @@ class HsaRocrDev(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='0071d14431f73ce74574e61d0786f2b7cf34b14ea898a1f54b6e1b06b2d468c0') version('3.5.0', sha256='52c12eec3e3404c0749c70f156229786ee0c3e6d3c979aed9bbaea500fa1f3b8') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') - for ver in ['3.5.0']: + for ver in ['3.5.0', '3.7.0']: depends_on('hsakmt-roct@' + ver, type=('link', 'run'), when='@' + ver) - depends_on('libelf@0.8:', type='link', when="@" + ver) + depends_on('llvm-amdgpu@3.7.0', when='@3.7.0') + depends_on('libelf@0.8:', type='link') depends_on('cmake@3:', type="build") + # Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways patch('0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch', when='@3.5.0') + patch('0002-Remove-explicit-RPATH-again.patch', when='@3.7.0') root_cmakelists_dir = 'src' def cmake_args(self): libelf_include = self.spec['libelf'].prefix.include.libelf args = ['-DLIBELF_INCLUDE_DIRS=%s' % libelf_include] + + if '@3.7.0' in self.spec: + args.append('-DIMAGE_SUPPORT=OFF') + return args diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py index 89ffe616a0..2bf427ecf7 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -17,6 +17,7 @@ class HsakmtRoct(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='b357fe7f425996c49f41748923ded1a140933de7564a70a828ed6ded6d896458') version('3.5.0', sha256='d9f458c16cb62c3c611328fd2f2ba3615da81e45f3b526e45ff43ab4a67ee4aa') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') @@ -24,7 +25,12 @@ class HsakmtRoct(CMakePackage): depends_on('cmake@3:', type='build') depends_on('numactl') - install_targets = ['install', 'install-dev'] + @property + def install_targets(self): + if self.version == Version('3.5.0'): + return ['install', 'install-dev'] + else: + return ['install'] def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index acd384441e..0846fd82a4 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -16,6 +16,7 @@ class LlvmAmdgpu(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='3e2542ce54b91b5c841f33d542143e0e43eae95e8785731405af29f08ace725b') version('3.5.0', sha256='4878fa85473b24d88edcc89938441edc85d2e8a785e567b7bd7ce274ecc2fd9c') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') @@ -26,6 +27,7 @@ class LlvmAmdgpu(CMakePackage): depends_on('zlib', type='link') depends_on('ncurses+termlib', type='link') + # Will likely only be fixed in LLVM 12 upstream patch('fix-system-zlib-ncurses.patch') root_cmakelists_dir = 'llvm' diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index 572f96d7e6..6a74c263c4 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -15,6 +15,7 @@ class Rocblas(CMakePackage): maintainers = ['haampie'] + version('3.7.0', sha256='9425db5f8e8b6f7fb172d09e2a360025b63a4e54414607709efc5acb28819642') version('3.5.0', sha256='8560fabef7f13e8d67da997de2295399f6ec595edfd77e452978c140d5f936f0') amdgpu_targets = ('all', 'gfx803', 'gfx900', 'gfx906', 'gfx908') @@ -22,11 +23,15 @@ class Rocblas(CMakePackage): variant('amdgpu_target', default='all', multi=True, values=amdgpu_targets) depends_on('cmake@3:', type='build') - depends_on('rocm-cmake@3.5.0', type='build', when='@3.5.0') - depends_on('rocm-device-libs@3.5.0', type='build', when='@3.5.0') - depends_on('hip@3.5.0', when='@3.5.0') - depends_on('comgr@3.5.0', type='build', when='@3.5.0') + for ver in ['3.5.0', '3.7.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) + + # This is the default library format since 3.7.0 + depends_on('msgpack-c@3:', when='@3.7:') depends_on('python', type='build') depends_on('py-virtualenv', type='build') @@ -42,6 +47,13 @@ class Rocblas(CMakePackage): commit='f842a1a4427624eff6cbddb2405c36dec9a210cd', when='@3.5.0') + resource(name='Tensile', + git='https://github.com/ROCmSoftwarePlatform/Tensile.git', + commit='af71ea890a893e647bf2cf4571a90297d65689ca', + when='@3.7.0') + + # Status: https://github.com/ROCmSoftwarePlatform/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087 + # Not yet landed in 3.7.0. patch('0001-Fix-compilation-error-with-StringRef-to-basic-string.patch') def setup_build_environment(self, env): @@ -59,12 +71,15 @@ class Rocblas(CMakePackage): '-DBUILD_CLIENTS_SAMPLES=OFF', '-DRUN_HEADER_TESTING=OFF', '-DBUILD_WITH_TENSILE=ON', - '-DBUILD_WITH_TENSILE_HOST=OFF', '-DTensile_TEST_LOCAL_PATH={0}'.format(tensile), '-DTensile_COMPILER=hipcc', '-DTensile_ARCHITECTURE={0}'.format(archs), '-DTensile_LOGIC=asm_full', - '-DTensile_CODE_OBJECT_VERSION=V3' + '-DTensile_CODE_OBJECT_VERSION=V3', + '-DBUILD_WITH_TENSILE_HOST=OFF' ] + if '@3.7.0' in self.spec: + args.append('-DTensile_LIBRARY_FORMAT=msgpack') + return args diff --git a/var/spack/repos/builtin/packages/rocclr/package.py b/var/spack/repos/builtin/packages/rocclr/package.py index 732e28e7f6..c01ecd13e3 100644 --- a/var/spack/repos/builtin/packages/rocclr/package.py +++ b/var/spack/repos/builtin/packages/rocclr/package.py @@ -13,19 +13,34 @@ class Rocclr(CMakePackage): runtimes to work on Windows as well as on Linux without much effort.""" homepage = "https://github.com/ROCm-Developer-Tools/ROCclr" - url = "https://github.com/ROCm-Developer-Tools/ROCclr/archive/roc-3.5.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + def url_for_version(self, version): + # Fix up a typo in the 3.5.0 release. + if version == Version('3.5.0'): + return "https://github.com/ROCm-Developer-Tools/ROCclr/archive/roc-3.5.0.tar.gz" + + url = "https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-{0}.tar.gz" + return url.format(version) + + version('3.7.0', sha256='a49f464bb2eab6317e87e3cc249aba3b2517a34fbdfe50175f0437f69a219adc') version('3.5.0', sha256='87c1ee9f02b8aa487b628c543f058198767c474cec3d21700596a73c028959e1') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + + for ver in ['3.5.0', '3.7.0']: depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver) depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver) depends_on('comgr@' + ver, type='build', when='@' + ver) - depends_on('mesa~llvm@18.3:', type='link', when='@' + ver) + depends_on('libelf', type='link', when='@3.7.0') + depends_on('numactl', type='link', when='@3.7.0') + + depends_on('mesa~llvm@18.3:', type='link') + + # See: https://github.com/ROCm-Developer-Tools/ROCclr/pull/16 + # In 3.7.0 the find opengl things have changed slightly. patch('opengl.patch', when='@3.5.0') resource(name='opencl-on-vdi', @@ -33,17 +48,33 @@ class Rocclr(CMakePackage): sha256='511b617d5192f2d4893603c1a02402b2ac9556e9806ff09dd2a91d398abf39a0', expand=True, destination='', - placement='opencl-on-vdi') + placement='opencl-on-vdi', + when='@3.5.0') + + resource(name='opencl-on-vdi', + url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-3.7.0.tar.gz', + sha256='283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b', + expand=True, + destination='', + placement='opencl-on-vdi', + when='@3.7.0') @run_after('install') def deploy_missing_files(self): - # the amdrocclr_staticTargets.cmake file is generated but not installed - # and when we install it by hand, we have to fix the path to the static - # library libamdrocclr_static.a from build dir to prefix lib dir. - cmakefile = join_path(self.build_directory, - 'amdrocclr_staticTargets.cmake') - filter_file(self.build_directory, self.prefix.lib, cmakefile) - install(cmakefile, self.prefix.lib) + if '@3.5.0' in self.spec: + # the amdrocclr_staticTargets.cmake file is generated but not + # installed and when we install it by hand, we have to fix the + # path to the static library libamdrocclr_static.a from build + # dir to prefix lib dir. + cmakefile = join_path(self.build_directory, + 'amdrocclr_staticTargets.cmake') + filter_file(self.build_directory, self.prefix.lib, cmakefile) + install(cmakefile, self.prefix.lib) + + if '@3.7.0' in self.spec: + path = join_path(self.prefix.lib, + 'cmake/rocclr/ROCclrConfig.cmake') + filter_file(self.build_directory, self.prefix, path) def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index 0300649cae..ebcfd84ed2 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -15,6 +15,7 @@ class Rocfft(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='94462e4bd19c2c749fcf6903adbee66d4d3bd345c0246861ff8f40b9d08a6ead') version('3.5.0', sha256='629f02cfecb7de5ad2517b6a8aac6ed4de60d3a9c620413c4d9db46081ac2c88') amdgpu_targets = ( @@ -27,11 +28,12 @@ class Rocfft(CMakePackage): variant('amdgpu_target', default='gfx701', multi=True, values=amdgpu_targets) depends_on('cmake@3:', type='build') - depends_on('rocm-cmake@3.5.0', type='build', when='@3.5.0') - depends_on('rocm-device-libs@3.5.0', type='build', when='@3.5.0') - depends_on('hip@3.5.0', type=('build', 'link'), when='@3.5.0') - depends_on('comgr@3.5.0', type='build', when='@3.5.0') + for ver in ['3.5.0', '3.7.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) def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) diff --git a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py index c7e61a0227..d3a94f09e3 100644 --- a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py +++ b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py @@ -15,12 +15,14 @@ class RocmBandwidthTest(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='9aa1d4b7b01ee4d443effc76ed5f6f43a051fd815692b59dfccf0ecbfeaeed03') version('3.5.0', sha256='fbb63fb8713617fd167d9c1501acbd92a6b189ee8e1a8aed668fa6666baae389') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + + for ver in ['3.5.0', '3.7.0']: depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py index d8bea02850..f030f0881f 100644 --- a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py +++ b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py @@ -14,11 +14,15 @@ class RocmClangOcl(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='9c00c7e7dd3ac8326ae6772a43866b44ae049d5960ea6993d14a2370db74d326') version('3.5.0', sha256='38c95fbd0ac3d11d9bd224ad333b68b9620dde502b8a8a9f3d96ba642901e8bb') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + + for ver in ['3.5.0', '3.7.0']: depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver) + + depends_on('rocm-device-libs@3.7.0', type='build', when='@3.7.0') diff --git a/var/spack/repos/builtin/packages/rocm-cmake/package.py b/var/spack/repos/builtin/packages/rocm-cmake/package.py index e67384248f..b82d717a52 100644 --- a/var/spack/repos/builtin/packages/rocm-cmake/package.py +++ b/var/spack/repos/builtin/packages/rocm-cmake/package.py @@ -16,6 +16,7 @@ class RocmCmake(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='51abfb06124c2e0677c4d6f7fe83c22fe855cb21386f0053ace09f8ab297058b') version('3.5.0', sha256='5fc09e168879823160f5fdf4fd1ace2702d36545bf733e8005ed4ca18c3e910f') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') diff --git a/var/spack/repos/builtin/packages/rocm-debug-agent/0001-Drop-overly-strict-Werror-flag.patch b/var/spack/repos/builtin/packages/rocm-debug-agent/0001-Drop-overly-strict-Werror-flag.patch new file mode 100644 index 0000000000..676463c4d0 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocm-debug-agent/0001-Drop-overly-strict-Werror-flag.patch @@ -0,0 +1,25 @@ +From 6143a6b694b6941056687c830820b7a8d71b84c7 Mon Sep 17 00:00:00 2001 +From: Harmen Stoppels <harmenstoppels@gmail.com> +Date: Tue, 1 Sep 2020 11:58:31 +0200 +Subject: [PATCH] Drop overly strict -Werror flag + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6cc0aa..5cc5d9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -67,7 +67,7 @@ find_package(LibDw REQUIRED) + + target_include_directories(rocm-debug-agent + SYSTEM PRIVATE ${ROCR_INCLUDES} ${LIBELF_INCLUDES} ${LIBDW_INCLUDES}) +-target_compile_options(rocm-debug-agent PRIVATE -Werror -Wall) ++target_compile_options(rocm-debug-agent PRIVATE -Wall) + + if(DEFINED ENV{ROCM_BUILD_ID}) + # ROCM_BUILD_ID is set by the ROCm-CI build environment. +-- +2.25.1 + diff --git a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py index 5df5dcb477..9def3ff9e5 100644 --- a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py +++ b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py @@ -15,22 +15,44 @@ class RocmDebugAgent(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='d0f442a2b224a734b0080c906f0fc3066a698e5cde9ff97ffeb485b36d2caba1') version('3.5.0', sha256='203ccb18d2ac508aae40bf364923f67375a08798b20057e574a0c5be8039f133') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + depends_on("elfutils", type='link') + + for ver in ['3.5.0', '3.7.0']: depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) depends_on('hsakmt-roct@' + ver, type='link', when='@' + ver) - depends_on("elfutils", type='link', when='@' + ver) - root_cmakelists_dir = 'src' + depends_on('rocm-dbgapi@3.7.0', type='link', when='@3.7.0') + depends_on('hip@3.7.0', when='@3.7.0') + + # https://github.com/ROCm-Developer-Tools/rocr_debug_agent/pull/4 + patch('0001-Drop-overly-strict-Werror-flag.patch', when='@3.7.0') + + @property + def root_cmakelists_dir(self): + if '@3.5.0' in self.spec: + return 'src' + else: + return self.stage.source_path def cmake_args(self): spec = self.spec - args = [ - '-DCMAKE_PREFIX_PATH={0}/include/hsa;{1}/include,'. - format(spec['hsa-rocr-dev'].prefix, spec['hsakmt-roct'].prefix) - ] + args = [] + + if '@3.5.0' in spec: + args.append( + '-DCMAKE_PREFIX_PATH={0}/include/hsa;{1}/include,'. + format(spec['hsa-rocr-dev'].prefix, spec['hsakmt-roct'].prefix) + ) + + if '@3.7.0' in spec: + args.append( + '-DCMAKE_MODULE_PATH={0}'. + format(spec['hip'].prefix.cmake) + ) return args diff --git a/var/spack/repos/builtin/packages/rocm-device-libs/package.py b/var/spack/repos/builtin/packages/rocm-device-libs/package.py index 3d6a46f5d3..6ebcd0e14f 100644 --- a/var/spack/repos/builtin/packages/rocm-device-libs/package.py +++ b/var/spack/repos/builtin/packages/rocm-device-libs/package.py @@ -15,12 +15,13 @@ class RocmDeviceLibs(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d') version('3.5.0', sha256='dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + for ver in ['3.5.0', '3.7.0']: depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver) depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/rocminfo/package.py b/var/spack/repos/builtin/packages/rocminfo/package.py index 97fe98ff5b..70ef3a6120 100644 --- a/var/spack/repos/builtin/packages/rocminfo/package.py +++ b/var/spack/repos/builtin/packages/rocminfo/package.py @@ -15,11 +15,14 @@ class Rocminfo(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='86a8e3ce7d91fb2d79688a22a2805757c83922d9f17ea7ea1cb41bf9516197ea') version('3.5.0', sha256='1d113f06b7c9b60d0e92b2c12c0c704a565696867496fe7038e5dddd510567b7') depends_on('cmake@3:', type='build') - depends_on('hsakmt-roct@3.5.0', type='build', when='@3.5.0') - depends_on('hsa-rocr-dev@3.5.0', type='build', when='@3.5.0') + + for ver in ['3.5.0', '3.7.0']: + depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver) + depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver) def cmake_args(self): args = ['-DROCM_DIR={0}'.format(self.spec['hsa-rocr-dev'].prefix)] diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index 3d9347bc95..8c5b4813c0 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -18,10 +18,12 @@ class Rocsparse(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='db561ae5e8ee117f7c539a9ef6ee49c13b82ba9f702b22c76e741cca245386a9') version('3.5.0', sha256='9ca6bae7da78abbb47143c3d77ff4a8cd7d63979875fc7ebc46b400769fd9cb5') depends_on('cmake@3:', type='build') - for ver in ['3.5.0']: + + for ver in ['3.5.0', '3.7.0']: depends_on('hip@' + ver, when='@' + ver) depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver) depends_on('comgr@' + ver, type='build', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/roctracer-dev/package.py b/var/spack/repos/builtin/packages/roctracer-dev/package.py index 5709ef487d..f79f3e1042 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev/package.py @@ -17,13 +17,16 @@ class RoctracerDev(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.7.0', sha256='6fa5b771e990f09c242237ab334b9f01039ec7d54ccde993e719c5d6577d1518') version('3.5.0', sha256='7af5326c9ca695642b4265232ec12864a61fd6b6056aa7c4ecd9e19c817f209e') depends_on('cmake@3:', type='build') - depends_on('hsakmt-roct@3.5.0:', type='build', when='@3.5.0:') - depends_on('hsa-rocr-dev@3.5.0:', type='build', when='@3.5.0:') - depends_on('rocminfo@3.5.0:', type='build', when='@3.5.0:') - depends_on('hip@3.5.0:', type='build', when='@3.5.0:') + + for ver in ['3.5.0', '3.7.0']: + depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver) + depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver) + depends_on('rocminfo@' + ver, type='build', when='@' + ver) + depends_on('hip@' + ver, type='build', when='@' + ver) def setup_build_environment(self, build_env): spec = self.spec |