summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com>2020-09-15 11:16:41 -0700
committerGitHub <noreply@github.com>2020-09-15 13:16:41 -0500
commitbad9f2bc2844b84b188b5be9fef360bc6848c608 (patch)
tree87a37a21d483a281b200d30cb88d64c43fc1d7f3
parent1b1bfd883aadbc61cbdefaf67a8722991055eaad (diff)
downloadspack-bad9f2bc2844b84b188b5be9fef360bc6848c608.tar.gz
spack-bad9f2bc2844b84b188b5be9fef360bc6848c608.tar.bz2
spack-bad9f2bc2844b84b188b5be9fef360bc6848c608.tar.xz
spack-bad9f2bc2844b84b188b5be9fef360bc6848c608.zip
AMD ROCmValidationSuite recipe for 3.5.0 and 3.7.0 (#18678)
* AMD ROCmValidationSuite recipe for 3.5.0 and 3.7.0 * Updated the PR comments for rocmvalidationsuite recipe
-rw-r--r--var/spack/repos/builtin/packages/rocmvalidationsuite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch33
-rw-r--r--var/spack/repos/builtin/packages/rocmvalidationsuite/package.py52
2 files changed, 85 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/rocmvalidationsuite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch b/var/spack/repos/builtin/packages/rocmvalidationsuite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch
new file mode 100644
index 0000000000..cc47c5e9d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocmvalidationsuite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch
@@ -0,0 +1,33 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fc4d98e..f1dea96 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -164,7 +164,7 @@ endif()
+ message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" )
+
+ if ( NOT DEFINED CMAKE_PACKAGING_INSTALL_PREFIX )
+- set (CMAKE_PACKAGING_INSTALL_PREFIX "/opt/rocm" )
++ set (CMAKE_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
+ endif ()
+
+ ################################################################################
+@@ -369,16 +369,16 @@ if (RVS_ROCBLAS EQUAL 1)
+ set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
+ set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
+ else()
+- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
+- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
++ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
+ endif()
+
+ if (RVS_ROCMSMI EQUAL 1)
+ set(ROCM_SMI_INC_DIR "${CMAKE_BINARY_DIR}/rvs_smi-src/include")
+ set(ROCM_SMI_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_smi-build")
+ else()
+- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/rocm_smi/include")
+- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
++ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
++ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
+ endif()
+ set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
diff --git a/var/spack/repos/builtin/packages/rocmvalidationsuite/package.py b/var/spack/repos/builtin/packages/rocmvalidationsuite/package.py
new file mode 100644
index 0000000000..1ada55e60c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocmvalidationsuite/package.py
@@ -0,0 +1,52 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack import *
+
+
+class Rocmvalidationsuite(CMakePackage):
+ """The ROCm Validation Suite (RVS) is a system administrators
+ and cluster manager's tool for detecting and troubleshooting
+ common problems affecting AMD GPU(s) running in a high-performance
+ computing environment, enabled using the ROCm software stack on a
+ compatible platform."""
+
+ homepage = "https://github.com/ROCm-Developer-Tools/ROCmValidationSuite"
+ url = "https://github.com/ROCm-Developer-Tools/ROCmValidationSuite/archive/rocm-3.7.0.tar.gz"
+
+ maintainers = ['srekolam', 'arjun-raj-kuppala']
+
+ version('3.7.0', sha256='bb42d7fb7ee877b80ce53b0cd1f04b0c8301197b6777d2edddcb44732bf8c9e2')
+ version('3.5.0', sha256='273e67ecce7e32939341679362b649f3361a36a22fab5f64cefe94b49e6f1e46')
+
+ variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
+
+ patch('001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch')
+
+ depends_on('cmake@3.5:', type='build')
+ depends_on('zlib', type='link')
+
+ def setup_build_environment(self, build_env):
+ spec = self.spec
+ build_env.set("HIPCC_PATH", spec['hip'].prefix)
+
+ for ver in ['3.5.0', '3.7.0']:
+ depends_on('hip@' + ver, type='build', when='@' + ver)
+ depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver)
+ depends_on('comgr@' + ver, type='build', when='@' + ver)
+ 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)
+ depends_on('rocminfo@' + ver, type='build', when='@' + ver)
+ depends_on('rocblas@' + ver, type='link', when='@' + ver)
+ depends_on('rocm-smi-lib@' + ver, type='build', when='@' + ver)
+
+ def cmake_args(self):
+ spec = self.spec
+ args = ['-DHIP_INC_DIR={0}'.format(spec['hip'].prefix),
+ '-DROCM_SMI_DIR={0}'.format(spec['rocm-smi-lib'].prefix),
+ '-DROCBLAS_DIR={0}'.format(spec['rocblas'].prefix)]
+ return args