From 5fe8937232d0f5a8aa33a7fae2ccf5411e17b39d Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Mon, 15 Jul 2024 12:54:47 -0400 Subject: [PATCH] fix hipRAND build with newer rocRAND - needs to be build now separately while earlier the rocRAND build and installed also the hipRAND - rocRAND needs to be build first as hipRAND depends from the rocRAND - extra existence checks before creating symlinks sdk/rocrand/include and sdk/hiprand/include Signed-off-by: Mika Laitio --- ...and.binfo => 026_01_hiprand_rocrand.binfo} | 3 +-- binfo/026_01_rocrand_hiprand.binfo | 12 ----------- binfo/026_02_hiprand_hiprand.binfo | 20 +++++++++++++++++++ binfo/binfo_list.sh | 4 ++-- 4 files changed, 23 insertions(+), 16 deletions(-) rename binfo/{026_02_rocrand_rocrand.binfo => 026_01_hiprand_rocrand.binfo} (82%) delete mode 100755 binfo/026_01_rocrand_hiprand.binfo create mode 100755 binfo/026_02_hiprand_hiprand.binfo diff --git a/binfo/026_02_rocrand_rocrand.binfo b/binfo/026_01_hiprand_rocrand.binfo similarity index 82% rename from binfo/026_02_rocrand_rocrand.binfo rename to binfo/026_01_hiprand_rocrand.binfo index 5df4ce0..f0035da 100755 --- a/binfo/026_02_rocrand_rocrand.binfo +++ b/binfo/026_01_hiprand_rocrand.binfo @@ -22,7 +22,6 @@ BINFO_APP_PRE_CONFIG_CMD_ARRAY=( ) BINFO_APP_POST_INSTALL_CMD_ARRAY=( - "if [ ! -e ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/hiprand ]; then ln -s ${INSTALL_DIR_PREFIX_SDK_ROOT}/hiprand/include ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/hiprand; fi" - "if [ ! -e ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/rocrand ]; then ln -s ${INSTALL_DIR_PREFIX_SDK_ROOT}/rocrand/include ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/rocrand; fi" + "if [[ -e ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/rocrand && ! -e ${INSTALL_DIR_PREFIX_SDK_ROOT}/rocrand/include ]]; then ln -s ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/rocrand ${INSTALL_DIR_PREFIX_SDK_ROOT}/rocrand/include; fi" "unset LDFLAGS" ) diff --git a/binfo/026_01_rocrand_hiprand.binfo b/binfo/026_01_rocrand_hiprand.binfo deleted file mode 100755 index 64c66f4..0000000 --- a/binfo/026_01_rocrand_hiprand.binfo +++ /dev/null @@ -1,12 +0,0 @@ -BINFO_APP_NAME=hipRAND -BINFO_APP_SRC_SUBDIR_BASENAME= -BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME} -BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" -BINFO_APP_UPSTREAM_REPO_URL=https://github.com/ROCm/hipRAND.git -#use default git tag -#BINFO_APP_UPSTREAM_REPO_VERSION_TAG=rocm-5.7.1 - -BINFO_APP_NO_CONFIG=1 -BINFO_APP_NO_BUILD=1 -BINFO_APP_NO_INSTALL=1 -BINFO_APP_NO_POSTINSTALL=1 diff --git a/binfo/026_02_hiprand_hiprand.binfo b/binfo/026_02_hiprand_hiprand.binfo new file mode 100755 index 0000000..d2a062c --- /dev/null +++ b/binfo/026_02_hiprand_hiprand.binfo @@ -0,0 +1,20 @@ +BINFO_APP_NAME=hipRAND +BINFO_APP_SRC_SUBDIR_BASENAME= +BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME} +BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" +BINFO_APP_UPSTREAM_REPO_URL=https://github.com/ROCm/hipRAND.git +#use default git tag +#BINFO_APP_UPSTREAM_REPO_VERSION_TAG=rocm-5.7.1 + +CFG_TEMP1=-DAMDGPU_TARGETS="${SEMICOLON_SEPARATED_GPU_TARGET_LIST_DEFAULT}" + +BINFO_APP_CMAKE_CFG="-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR_PREFIX_SDK_ROOT}" +BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DCMAKE_PREFIX_PATH=${INSTALL_DIR_PREFIX_SDK_ROOT}/lib64/cmake;${INSTALL_DIR_PREFIX_SDK_ROOT}/lib/cmake" +BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${CFG_TEMP1}" +BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DCMAKE_C_COMPILER=${SDK_C_COMPILER_DEFAULT}" +BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DCMAKE_CXX_COMPILER=${SDK_CXX_COMPILER_DEFAULT}" +BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${BINFO_APP_SRC_DIR}" + +BINFO_APP_POST_INSTALL_CMD_ARRAY=( + "if [[ -e ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/hiprand && ! -e ${INSTALL_DIR_PREFIX_SDK_ROOT}/hiprand/include ]]; then ln -s ${INSTALL_DIR_PREFIX_SDK_ROOT}/include/hiprand ${INSTALL_DIR_PREFIX_SDK_ROOT}/hiprand/include; fi" +) diff --git a/binfo/binfo_list.sh b/binfo/binfo_list.sh index a080d13..f44fe7b 100755 --- a/binfo/binfo_list.sh +++ b/binfo/binfo_list.sh @@ -62,8 +62,8 @@ LIST_BINFO_FILE_BASENAME=( "025_01_hipBLAS.binfo" "025_02_hipBLASLt.binfo" "025_03_blaze.binfo" - "026_01_rocrand_hiprand.binfo" - "026_02_rocrand_rocrand.binfo" + "026_01_hiprand_rocrand.binfo" + "026_02_hiprand_hiprand.binfo" "027_hipFFT.binfo" "028_01_hipSPARSE.binfo" "028_02_hipSPARSELt.binfo"