Skip to content

Commit

Permalink
fix hipRAND build with newer rocRAND
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
lamikr committed Jul 15, 2024
1 parent a2c755d commit 5fe8937
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
12 changes: 0 additions & 12 deletions binfo/026_01_rocrand_hiprand.binfo

This file was deleted.

20 changes: 20 additions & 0 deletions binfo/026_02_hiprand_hiprand.binfo
Original file line number Diff line number Diff line change
@@ -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"
)
4 changes: 2 additions & 2 deletions binfo/binfo_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5fe8937

Please sign in to comment.