Packages for test and benchmark executables on all supported OSes using CPack. (#512)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cd17cf6dce
Коммит
a8f1e61f48
@@ -2,6 +2,10 @@
|
||||
|
||||
Full documentation for RCCL is available at [https://rccl.readthedocs.io](https://rccl.readthedocs.io)
|
||||
|
||||
## (Unreleased) RCCL-2.10.4
|
||||
### Added
|
||||
- Packages for test and benchmark executables on all supported OSes using CPack.
|
||||
|
||||
## RCCL-2.10.3 for ROCm 5.0.0
|
||||
### Added
|
||||
- Compatibility with NCCL 2.10.3
|
||||
|
||||
@@ -296,11 +296,8 @@ if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY)
|
||||
DESTINATION "./rccl/include/" )
|
||||
endif()
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-rocclr (>= 3.5.0)")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-smi-lib (>= 4.0.0)")
|
||||
rocm_package_add_dependencies(DEPENDS "hip-rocclr >= 3.5.0" "rocm-smi-lib >= 4.0.0")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "hip-rocclr >= 3.5.0")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "rocm-smi-lib >= 4.0.0")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt" "${ROCM_PATH}")
|
||||
|
||||
find_file (DEBIAN debian_version debconf.conf PATHS /etc)
|
||||
@@ -333,6 +330,14 @@ License: See LICENSE.txt for license information\n")
|
||||
Optimized primitives for collective multi-GPU communication")
|
||||
endif()
|
||||
|
||||
rocm_install_symlink_subdir(rccl)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
rocm_package_setup_component(clients)
|
||||
rocm_package_setup_client_component(tests)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
rocm_create_package(
|
||||
NAME
|
||||
rccl
|
||||
@@ -341,8 +346,3 @@ rocm_create_package(
|
||||
MAINTAINER
|
||||
"RCCL Maintainer <rccl-maintainer@amd.com>"
|
||||
LDCONFIG)
|
||||
|
||||
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
@@ -52,7 +52,7 @@ if(NOT GTest_FOUND AND BUILD_TESTS OR INSTALL_DEPENDENCIES)
|
||||
GIT_REPOSITORY https://github.com/google/googletest.git
|
||||
GIT_TAG release-1.11.0
|
||||
INSTALL_DIR ${GTEST_ROOT}
|
||||
CMAKE_ARGS -DBUILD_GTEST=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${COMPILER_OVERRIDE}
|
||||
CMAKE_ARGS -DBUILD_GTEST=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${COMPILER_OVERRIDE} -DBUILD_SHARED_LIBS=OFF
|
||||
LOG_DOWNLOAD TRUE
|
||||
LOG_CONFIGURE TRUE
|
||||
LOG_BUILD TRUE
|
||||
@@ -73,7 +73,7 @@ endif()
|
||||
|
||||
# Find or download/install rocm-cmake project
|
||||
set( PROJECT_EXTERN_DIR ${CMAKE_CURRENT_BINARY_DIR}/extern )
|
||||
find_package(ROCM 0.6 QUIET CONFIG PATHS /opt/rocm)
|
||||
find_package(ROCM 0.7.3 QUIET CONFIG PATHS /opt/rocm)
|
||||
if(NOT ROCM_FOUND)
|
||||
set(rocm_cmake_tag "master" CACHE STRING "rocm-cmake tag to download")
|
||||
file(
|
||||
@@ -103,7 +103,7 @@ if(NOT ROCM_FOUND)
|
||||
if(rocm_cmake_unpack_error_code)
|
||||
message(FATAL_ERROR "Error: unpacking ${CMAKE_CURRENT_BINARY_DIR}/rocm-cmake-${rocm_cmake_tag}.zip failed")
|
||||
endif()
|
||||
find_package( ROCM 0.6 REQUIRED CONFIG PATHS ${PROJECT_EXTERN_DIR}/rocm-cmake )
|
||||
find_package( ROCM 0.7.3 REQUIRED CONFIG PATHS ${PROJECT_EXTERN_DIR}/rocm-cmake )
|
||||
endif()
|
||||
|
||||
include(ROCMSetupVersion)
|
||||
@@ -111,5 +111,6 @@ include(ROCMCreatePackage)
|
||||
include(ROCMInstallTargets)
|
||||
include(ROCMPackageConfigHelpers)
|
||||
include(ROCMInstallSymlinks)
|
||||
include(ROCMCheckTargetIds)
|
||||
include(ROCMClients)
|
||||
include( ROCMHeaderWrapper )
|
||||
include(ROCMCheckTargetIds OPTIONAL)
|
||||
|
||||
@@ -108,12 +108,15 @@ if(BUILD_TESTS)
|
||||
# HIPCC adds /opt/rocm/lib as RPATH, even though the install process is supposed to
|
||||
# remove RPATH. It also occurs before any user-specified rpath, which effectively overrides the user rpath.
|
||||
# As a work-around, set the correct RPATH for the unit test executable as a post-install step
|
||||
if (CMAKE_INSTALL_PREFIX MATCHES "${ROCM_PATH}")
|
||||
# install_prefix/CMAKE_INSTALL_PREFIX was not explicitly specified, so look in build/release
|
||||
add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r ${CMAKE_BINARY_DIR}:${ROCM_PATH}/lib ${CMAKE_BINARY_DIR}/test/UnitTests)
|
||||
else()
|
||||
add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r ${CMAKE_INSTALL_PREFIX}/lib:${ROCM_PATH}/lib ${CMAKE_INSTALL_PREFIX}/test/UnitTests)
|
||||
endif()
|
||||
# if (CMAKE_INSTALL_PREFIX MATCHES "${ROCM_PATH}")
|
||||
# # install_prefix/CMAKE_INSTALL_PREFIX was not explicitly specified, so look in build/release
|
||||
# add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r ${CMAKE_BINARY_DIR}:${ROCM_PATH}/lib ${CMAKE_BINARY_DIR}/test/UnitTests)
|
||||
# else()
|
||||
# add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r ${CMAKE_INSTALL_PREFIX}/lib:${ROCM_PATH}/lib ${CMAKE_INSTALL_PREFIX}/test/UnitTests)
|
||||
# endif()
|
||||
set_property(TARGET UnitTests PROPERTY INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${ROCM_PATH}/lib;${CMAKE_BINARY_DIR}")
|
||||
set_property(TARGET UnitTests PROPERTY BUILD_RPATH "${CMAKE_BINARY_DIR};${ROCM_PATH}/lib")
|
||||
rocm_install(TARGETS UnitTests COMPONENT tests)
|
||||
else()
|
||||
message("Not building unit tests")
|
||||
endif()
|
||||
|
||||
Ссылка в новой задаче
Block a user