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
This commit is contained in:
arjun-raj-kuppala 2020-09-15 11:16:41 -07:00 committed by GitHub
parent 1b1bfd883a
commit bad9f2bc28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 85 additions and 0 deletions

View File

@ -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")

View File

@ -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