diff options
author | Cory Bloor <Cordell.Bloor@amd.com> | 2022-06-20 01:52:47 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 09:52:47 +0200 |
commit | b19a0744f131afe7d6b5155f29c937716c602d1c (patch) | |
tree | ba03ff9f9bbce3468eba676452ccec43b5849ab3 | |
parent | 75d0c0dff717aeeb3673e9bdd1ba33d20549308a (diff) | |
download | spack-b19a0744f131afe7d6b5155f29c937716c602d1c.tar.gz spack-b19a0744f131afe7d6b5155f29c937716c602d1c.tar.bz2 spack-b19a0744f131afe7d6b5155f29c937716c602d1c.tar.xz spack-b19a0744f131afe7d6b5155f29c937716c602d1c.zip |
rocm: add master and develop to BLAS and SOLVER (#30273)
5 files changed, 97 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/hipblas/package.py b/var/spack/repos/builtin/packages/hipblas/package.py index d3200282db..9cb7512868 100644 --- a/var/spack/repos/builtin/packages/hipblas/package.py +++ b/var/spack/repos/builtin/packages/hipblas/package.py @@ -16,9 +16,11 @@ class Hipblas(CMakePackage): git = "https://github.com/ROCmSoftwarePlatform/hipBLAS.git" url = "https://github.com/ROCmSoftwarePlatform/hipBLAS/archive/rocm-5.1.3.tar.gz" - maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie'] + maintainers = ['cgmb', 'srekolam', 'arjun-raj-kuppala', 'haampie'] libraries = ['libhipblas'] + version('develop', branch='develop') + version('master', branch='master') version('5.1.3', sha256='f0fdaa851971b41b48ec2e7d640746fbd6f9f433da2020c5fd95c91a7473d9e1') version('5.1.0', sha256='22faba3828e50a4c4e22f569a7d6441c797a11db1d472619c01d3515a3275e92') version('5.0.2', sha256='201772bfc422ecb2c50e898dccd7d3d376cf34a2b795360e34bf71326aa37646') @@ -42,7 +44,7 @@ class Hipblas(CMakePackage): depends_on('googletest@1.10.0:', type='test') depends_on('netlib-lapack@3.7.1:', type='test') - depends_on('boost@1.64.0:1.76.0 cxxstd=14', type='test') + depends_on('boost@1.64.0:1.76.0 +program_options cxxstd=14', type='test') patch('link-clients-blas.patch', when='@4.3.0:4.3.2') patch('link-clients-blas-4.5.0.patch', when='@4.5.0:4.5.2') @@ -50,7 +52,16 @@ class Hipblas(CMakePackage): def check(self): exe = join_path(self.build_directory, 'clients', 'staging', 'hipblas-test') - self.run_test(exe) + self.run_test(exe, options=['--gtest_filter=-*known_bug*']) + + depends_on('hip@4.1.0:', when='@4.1.0:') + depends_on('rocm-cmake@master', type='build', when='@master:') + depends_on('rocm-cmake@4.5.0:', type='build', when='@4.5.0:') + depends_on('rocm-cmake@3.5.0:', type='build') + + for ver in ['master', 'develop']: + depends_on('rocblas@' + ver, when='@' + ver) + depends_on('rocsolver@' + ver, 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', '4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0', @@ -58,8 +69,6 @@ class Hipblas(CMakePackage): depends_on('hip@' + ver, when='@' + ver) depends_on('rocsolver@' + ver, when='@' + ver) depends_on('rocblas@' + ver, when='@' + ver) - depends_on('comgr@' + ver, type='build', when='@' + ver) - depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver) @classmethod def determine_version(cls, lib): @@ -91,6 +100,9 @@ class Hipblas(CMakePackage): if self.spec.satisfies('^cmake@3.21.0:3.21.2'): args.append(self.define('__skip_rocmclang', 'ON')) + if self.spec.satisfies('@5.2.0:'): + args.append(self.define('BUILD_FILE_REORG_BACKWARD_COMPATIBILITY', 'ON')) + return args def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/hipsolver/package.py b/var/spack/repos/builtin/packages/hipsolver/package.py index 1222bc2892..48b3b8d871 100644 --- a/var/spack/repos/builtin/packages/hipsolver/package.py +++ b/var/spack/repos/builtin/packages/hipsolver/package.py @@ -20,9 +20,11 @@ class Hipsolver(CMakePackage): git = "https://github.com/ROCmSoftwarePlatform/hipSOLVER.git" url = "https://github.com/ROCmSoftwarePlatform/hipSOLVER/archive/rocm-5.1.3.tar.gz" - maintainers = ['srekolam'] + maintainers = ['cgmb', 'srekolam'] libraries = ['libhipsolver'] + version('develop', branch='develop') + version('master', branch='master') version('5.1.3', sha256='96faa799a2db8078b72f9c3b5c199179875a7c20dc1064371b22a6a63397c145') version('5.1.0', sha256='697ba2b2814e7ac6f79680e6455b4b5e0def1bee2014b6940f47be7d13c0ae74') version('5.0.2', sha256='cabeada451686ed7904a452c5f8fd3776721507db1c06f426cd8d7189ff4a441') @@ -34,11 +36,25 @@ class Hipsolver(CMakePackage): depends_on('cmake@3.5:', type='build') + depends_on('hip@4.1.0:', when='@4.1.0:') + depends_on('rocm-cmake@master', type='build', when='@master:') + depends_on('rocm-cmake@4.5.0:', type='build') + + for ver in ['master', 'develop']: + depends_on('rocblas@' + ver, when='@' + ver) + depends_on('rocsolver@' + ver, when='@' + ver) + for ver in ['4.5.0', '4.5.2', '5.0.0', '5.0.2', '5.1.0', '5.1.3']: depends_on('hip@' + ver, when='@' + ver) depends_on('rocblas@' + ver, when='@' + ver) depends_on('rocsolver@' + ver, when='@' + ver) - depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver) + + depends_on('googletest@1.10.0:', type='test') + depends_on('netlib-lapack@3.7.1:', type='test') + + def check(self): + exe = join_path(self.build_directory, 'clients', 'staging', 'hipsolver-test') + self.run_test(exe, options=['--gtest_filter=-*known_bug*']) def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) @@ -58,5 +74,10 @@ class Hipsolver(CMakePackage): def cmake_args(self): args = [ self.define('BUILD_CLIENTS_SAMPLES', 'OFF'), + self.define('BUILD_CLIENTS_TESTS', self.run_tests) ] + + if self.spec.satisfies('@5.2.0:'): + args.append(self.define('BUILD_FILE_REORG_BACKWARD_COMPATIBILITY', 'ON')) + return args diff --git a/var/spack/repos/builtin/packages/rocblas/0004-Find-python.patch b/var/spack/repos/builtin/packages/rocblas/0004-Find-python.patch new file mode 100644 index 0000000000..044dd0b831 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocblas/0004-Find-python.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0f5fcc50..b970bea8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,6 +24,8 @@ include(toolchain-options) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + ++find_package(Python3 REQUIRED COMPONENTS Interpreter) ++set(python "${Python3_EXECUTABLE}") + + # ######################################################################## + # Main diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index fc132fc95a..2475b34244 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -15,9 +15,11 @@ class Rocblas(CMakePackage): git = "https://github.com/ROCmSoftwarePlatform/rocBLAS.git" url = "https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-5.1.3.tar.gz" - maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie'] + maintainers = ['cgmb', 'srekolam', 'arjun-raj-kuppala', 'haampie'] libraries = ['librocblas'] + version('develop', branch='develop') + version('master', branch='master') version('5.1.3', sha256='915374431db8f0cecdc2bf318a0ad33c3a8eceedc461d7a06b92ccb02b07313c') version('5.1.0', sha256='efa0c424b5ada697314aa8a78c19c93ade15f1612c4bfc8c53d71d1c9719aaa3') version('5.0.2', sha256='358a0902fc279bfc80205659a90e96269cb7d83a80386b121e4e3dfe221fec23') @@ -64,19 +66,26 @@ class Rocblas(CMakePackage): depends_on('googletest@1.10.0:', type='test') depends_on('netlib-lapack@3.7.1:', type='test') + depends_on('llvm-amdgpu +openmp', type='test') def check(self): if '@4.2.0:' in self.spec: exe = join_path(self.build_directory, 'clients', 'staging', 'rocblas-test') self.run_test(exe, options=['--gtest_filter=*quick*-*known_bug*']) + depends_on('hip@4.1.0:', when='@4.1.0:') + depends_on('llvm-amdgpu@4.1.0:', type='build', when='@4.1.0:') + depends_on('rocm-cmake@master', type='build', when='@master:') + depends_on('rocm-cmake@4.5.0:', type='build', when='@4.5.0:') + depends_on('rocm-cmake@4.3.0:', type='build', when='@4.3.0:') + depends_on('rocm-cmake@3.5.0:', type='build') + for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0', '5.0.2', '5.1.0', '5.1.3']: depends_on('hip@' + ver, when='@' + ver) - depends_on('llvm-amdgpu@' + ver, when='@' + ver) + depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver) depends_on('rocminfo@' + ver, type='build', when='@' + ver) - depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver) for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0']: depends_on('rocm-smi@' + ver, type='build', when='@' + ver) @@ -119,11 +128,18 @@ class Rocblas(CMakePackage): commit=t_commit, when='{} +tensile'.format(t_version)) + for ver in ['master', 'develop']: + resource(name='Tensile', + git='https://github.com/ROCmSoftwarePlatform/Tensile.git', + branch=ver, + when='@{} +tensile'.format(ver)) + # 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') patch('0002-Fix-rocblas-clients-blas.patch', when='@4.2.0:4.3.1') - patch('0003-Fix-rocblas-gentest.patch', when='@4.2.0:') + patch('0003-Fix-rocblas-gentest.patch', when='@4.2.0:5.1') + patch('0004-Find-python.patch', when='@master:') def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) @@ -175,4 +191,7 @@ class Rocblas(CMakePackage): if self.spec.satisfies('^cmake@3.21.0:3.21.2'): args.append(self.define('__skip_rocmclang', 'ON')) + if self.spec.satisfies('@5.2.0:'): + args.append(self.define('BUILD_FILE_REORG_BACKWARD_COMPATIBILITY', 'ON')) + return args diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index e8327fdd3a..6b67d6649a 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -17,7 +17,7 @@ class Rocsolver(CMakePackage): git = "https://github.com/ROCmSoftwarePlatform/rocSOLVER.git" url = "https://github.com/ROCmSoftwarePlatform/rocSOLVER/archive/rocm-5.0.2.tar.gz" - maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie'] + maintainers = ['cgmb', 'srekolam', 'arjun-raj-kuppala', 'haampie'] libraries = ['librocsolver'] amdgpu_targets = ( @@ -30,6 +30,8 @@ class Rocsolver(CMakePackage): size and compile time by adding specialized kernels \ for small matrix sizes') + version('develop', branch='develop') + version('master', branch='master') version('5.1.3', sha256='5a8f3b95ac9a131c31538196e954ea53b863009c092cce0c0ef869a0cd5dd554') version('5.1.0', sha256='88de515a6e75eaa3c50c9c8ae1e7ae8e3b46e712e388f44f79b63fefa9fc0831') version('5.0.2', sha256='298e0903f1ba8074055ab072690f967062d6e06a9371574de23e4e38d2997688') @@ -60,16 +62,26 @@ class Rocsolver(CMakePackage): def check(self): exe = join_path(self.build_directory, 'clients', 'staging', 'rocsolver-test') - self.run_test(exe, options=['--gtest_filter=checkin*']) + self.run_test(exe, options=['--gtest_filter=checkin*-*known_bug*']) + + depends_on('hip@4.1.0:', when='@4.1.0:') + depends_on('rocm-cmake@master', type='build', when='@master:') + depends_on('rocm-cmake@4.5.0:', type='build', when='@4.5.0:') + depends_on('rocm-cmake@4.3.0:', type='build', when='@4.3.0:') + depends_on('rocm-cmake@3.5.0:', type='build') + + for ver in ['master', 'develop']: + depends_on('rocblas@' + ver, 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', '4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0', '5.0.2', '5.1.0', '5.1.3']: depends_on('hip@' + ver, when='@' + ver) - for tgt in itertools.chain(['auto'], amdgpu_targets): - depends_on('rocblas@{0} amdgpu_target={1}'.format(ver, tgt), - when='@{0} amdgpu_target={1}'.format(ver, tgt)) - depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver) + depends_on('rocblas@' + ver, when='@' + ver) + + for tgt in itertools.chain(['auto'], amdgpu_targets): + depends_on('rocblas amdgpu_target={0}'.format(tgt), + when='amdgpu_target={0}'.format(tgt)) @classmethod def determine_version(cls, lib): @@ -114,6 +126,9 @@ class Rocsolver(CMakePackage): if self.spec.satisfies('@4.5.0:'): args.append(self.define('ROCSOLVER_EMBED_FMT', 'ON')) + if self.spec.satisfies('@5.2.0:'): + args.append(self.define('BUILD_FILE_REORG_BACKWARD_COMPATIBILITY', 'ON')) + return args def setup_build_environment(self, env): |