summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch7
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch88
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/package.py4
3 files changed, 95 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch
index a95e0836b0..e1a40ac16d 100644
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch
@@ -1,11 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a3301ec..f62005a 100644
+index 07048b8..2bfb6c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -33,7 +33,7 @@ set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
+@@ -32,8 +32,7 @@ set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
+ set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
- set(HIP_INC_DIR "${ROCM_PATH}/hip" )
+-set(HIP_INC_DIR "${ROCM_PATH}/hip" )
-set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
+set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime")
set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch
new file mode 100644
index 0000000000..edd9507673
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch
@@ -0,0 +1,88 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 780e1f17..35a2b391 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,10 +24,21 @@
+ ################################################################################
+
+ cmake_minimum_required ( VERSION 3.5.0 )
++project ("rocm-validation-suite")
+ if ( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+ message(FATAL "In-source build is not allowed")
+ endif ()
+
++enable_testing()
++
++# Prerequisite - Check if rocblas was already installed
++find_package (rocblas)
++if(rocblas_FOUND)
++ message(STATUS "rocblas found")
++else()
++ message(FATAL_ERROR "rocblas not found !!! Install rocblas to proceed ...")
++endif(rocblas_FOUND)
++
+ set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
+ set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
+ set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
+@@ -36,7 +47,6 @@ set(HIP_INC_DIR "${ROCM_PATH}/hip" )
+ set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
+ set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
+
+-execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
+
+ #
+ # If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their
+@@ -45,20 +55,17 @@ execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
+ #
+ if(DEFINED CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of
+-build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
+-Release RelWithDebInfo MinSizeRel.")
++ build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
++ Release RelWithDebInfo MinSizeRel.")
+ else()
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build,
+-options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
+-RelWithDebInfo MinSizeRel.")
++ options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
++ RelWithDebInfo MinSizeRel.")
+ endif()
+
+-project ("rocm-validation-suite")
+-enable_testing()
+ #include ( CTest )
+
+-if (NOT CMAKE_CONFIGURATION_TYPES)
+-# message( "CMAKE_CONFIGURATION_TYPES not set")
++if(NOT CMAKE_CONFIGURATION_TYPES)
+ # Set the possible values of build type for cmake-gui
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+ "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+@@ -70,17 +77,15 @@ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rvs_os_helper.sh
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+-if(result)
++if (result)
+ message(FATAL_ERROR "Could not obtain OS type: ${result}")
+ endif()
+ message(STATUS "RVS_OS_TYPE: ${RVS_OS_TYPE}")
+ if (${RVS_OS_TYPE} STREQUAL "ubuntu")
+ set(RVS_OS_TYPE_NUM 1)
+- execute_process(COMMAND sudo apt-get install rocblas --assume-yes)
+ elseif ((${RVS_OS_TYPE} STREQUAL "centos") OR (${RVS_OS_TYPE} STREQUAL "rhel")
+ OR (${RVS_OS_TYPE} STREQUAL "sles"))
+ set(RVS_OS_TYPE_NUM 2)
+- execute_process(COMMAND sudo yum -y install rocblas )
+ else()
+ set(RVS_OS_TYPE_NUM 0)
+ endif()
+@@ -89,7 +94,7 @@ message(STATUS "RVS_OS_TYPE_NUM: ${RVS_OS_TYPE_NUM}")
+ ## Set default module path if not already set
+ if ( NOT DEFINED CMAKE_MODULE_PATH )
+ set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" )
+-endif ()
++endif()
+
+ ## Include common cmake modules
+ include ( utils )
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py
index 999581d55e..76b7d7c29f 100644
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py
@@ -19,6 +19,7 @@ class RocmValidationSuite(CMakePackage):
maintainers = ['srekolam', 'arjun-raj-kuppala']
+ version('4.3.0', sha256='f7a918b513c51dd5eadce3f2e091679b2dfe6544a913960ac483567792a06a4c')
version('4.2.0', sha256='b25e58a842a8eb90bfd6c4ae426ca5cfdd5de2f8a091761f83597f7cfc2cd0f3')
version('4.1.0', sha256='f9618f89384daa0ae897b36638a3737bcfa47e98778e360338267cd1fe2bbc66')
version('4.0.0', sha256='04743ca8901b94a801759a3c13c8caf3e6ea950ffcda6408173e6f9ef7b86e74')
@@ -32,6 +33,7 @@ class RocmValidationSuite(CMakePackage):
patch('001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch')
patch('002-remove-force-setting-hip-inc-path.patch', when='@4.1.0:')
+ patch('003-cmake-change-to-remove-installs-and-sudo.patch', when='@4.1.0:')
depends_on('cmake@3.5:', type='build')
depends_on('zlib', type='link')
@@ -41,7 +43,7 @@ class RocmValidationSuite(CMakePackage):
build_env.set("HIPCC_PATH", spec['hip'].prefix)
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.2.0', '4.3.0']:
depends_on('hip@' + ver, when='@' + ver)
depends_on('hip-rocclr@' + ver, when='@' + ver)
depends_on('rocminfo@' + ver, when='@' + ver)