File reorganization as per the new defined standard
The header files will in /opt/rocm-xxx/include/rccl Libraries and cmake will be in /opt/rocm-xxx/lib folder. Added wrappers for header files using rocm-cmake functions for backward compatibility.
このコミットが含まれているのは:
+15
-6
@@ -48,6 +48,8 @@ option(BUILD_TESTS "Build test programs" OFF)
|
||||
option(INSTALL_DEPENDENCIES "Force install dependencies" OFF)
|
||||
option(BUILD_ADDRESS_SANITIZER "Build with address sanitizer enabled" OFF)
|
||||
option(BUILD_ALLREDUCE_ONLY "Build AllReduce + sum + float kernel only" OFF)
|
||||
#Set the header wrapper ON by default.
|
||||
option(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY "Build with file/folder reorg with backward compatibility enabled" ON)
|
||||
|
||||
# parse version from Makefile NCCL_MAJOR, NCCL_MINOR, NCCL_PATCH must exist
|
||||
# NCCL_SUFFIX is optional NCCL_VERSION formatting is ((X) * 1000 + (Y) * 100 +
|
||||
@@ -271,19 +273,27 @@ rocm_set_soversion(rccl "1.0")
|
||||
|
||||
rocm_install_targets(TARGETS
|
||||
rccl
|
||||
PREFIX
|
||||
rccl)
|
||||
)
|
||||
rocm_install(FILES ${PROJECT_BINARY_DIR}/rccl.h
|
||||
DESTINATION rccl/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rccl)
|
||||
|
||||
rocm_export_targets(NAMESPACE
|
||||
roc::
|
||||
PREFIX
|
||||
rccl
|
||||
TARGETS
|
||||
rccl
|
||||
DEPENDS
|
||||
hip)
|
||||
if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY)
|
||||
#Create wrapper files
|
||||
rocm_wrap_header_dir( "${PROJECT_BINARY_DIR}"
|
||||
PATTERNS "*.h"
|
||||
rccl.h
|
||||
GUARDS SYMLINK WRAPPER
|
||||
WRAPPER_LOCATIONS rccl )
|
||||
#install the wrapper header file to package
|
||||
rocm_install( FILES "${PROJECT_BINARY_DIR}/rccl/include/rccl.h"
|
||||
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)")
|
||||
@@ -331,7 +341,6 @@ rocm_create_package(
|
||||
"RCCL Maintainer <rccl-maintainer@amd.com>"
|
||||
LDCONFIG)
|
||||
|
||||
rocm_install_symlink_subdir(rccl)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(test)
|
||||
|
||||
@@ -111,4 +111,5 @@ include(ROCMCreatePackage)
|
||||
include(ROCMInstallTargets)
|
||||
include(ROCMPackageConfigHelpers)
|
||||
include(ROCMInstallSymlinks)
|
||||
include( ROCMHeaderWrapper )
|
||||
include(ROCMCheckTargetIds OPTIONAL)
|
||||
|
||||
+13
-1
@@ -20,6 +20,7 @@ function display_help()
|
||||
echo " [--prefix] Specify custom directory to install RCCL to (default: /opt/rocm)."
|
||||
echo " [--address-sanitizer] Build with address sanitizer enabled"
|
||||
echo " [--build_allreduce_only] Build only AllReduce + sum + float kernel"
|
||||
echo " [--rm-legacy-include-dir] Remove legacy include dir Packaging added for file/folder reorg backward compatibility"
|
||||
}
|
||||
|
||||
# #################################################
|
||||
@@ -38,6 +39,7 @@ clean_build=true
|
||||
install_dependencies=false
|
||||
build_static=false
|
||||
build_allreduce_only=false
|
||||
build_freorg_bkwdcomp=true
|
||||
|
||||
# #################################################
|
||||
# Parameter parsing
|
||||
@@ -46,7 +48,7 @@ build_allreduce_only=false
|
||||
# check if we have a modern version of getopt that can handle whitespace and long parameters
|
||||
getopt -T
|
||||
if [[ $? -eq 4 ]]; then
|
||||
GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,install,dependencies,package_build,tests_build,run_tests_quick,static,run_tests_all,hcc,hip-clang,no_clean,prefix:,address-sanitizer,build_allreduce_only --options hidptrs -- "$@")
|
||||
GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,install,dependencies,package_build,tests_build,run_tests_quick,static,run_tests_all,hcc,hip-clang,no_clean,prefix:,address-sanitizer,build_allreduce_only,rm-legacy-include-dir --options hidptrs -- "$@")
|
||||
else
|
||||
echo "Need a new version of getopt"
|
||||
exit 1
|
||||
@@ -102,6 +104,9 @@ while true; do
|
||||
--build_allreduce_only)
|
||||
build_allreduce_only=true
|
||||
shift ;;
|
||||
--rm-legacy-include-dir)
|
||||
build_freorg_bkwdcomp=false
|
||||
shift ;;
|
||||
--prefix)
|
||||
install_prefix=${2}
|
||||
shift 2 ;;
|
||||
@@ -183,6 +188,13 @@ if [[ "${build_address_sanitizer}" == true ]]; then
|
||||
cmake_common_options="${cmake_common_options} -DBUILD_ADDRESS_SANITIZER=ON"
|
||||
fi
|
||||
|
||||
#Enable backward compatibility wrappers
|
||||
if [[ "${build_freorg_bkwdcomp}" == true ]]; then
|
||||
cmake_common_options="${cmake_common_options} -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=ON"
|
||||
else
|
||||
cmake_common_options="${cmake_common_options} -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF"
|
||||
fi
|
||||
|
||||
compiler=hipcc
|
||||
if [[ "${build_hip_clang}" == false ]]; then
|
||||
compiler=hcc
|
||||
|
||||
@@ -7,7 +7,7 @@ b
|
||||
#pragma once
|
||||
#include "PtrUnion.hpp"
|
||||
#include "PrepDataFuncs.hpp"
|
||||
#include "rccl.h"
|
||||
#include "rccl/rccl.h"
|
||||
|
||||
namespace RcclUnitTesting
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
#include <hsa/hsa.h>
|
||||
#include <vector>
|
||||
#include "rccl.h"
|
||||
#include "rccl/rccl.h"
|
||||
|
||||
namespace RcclUnitTesting
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ErrCode.hpp"
|
||||
#include "rccl.h"
|
||||
#include "rccl/rccl.h"
|
||||
#include "rccl_bfloat16.h"
|
||||
|
||||
namespace RcclUnitTesting
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
************************************************************************/
|
||||
#include <unistd.h>
|
||||
#include "TestBed.hpp"
|
||||
#include <rccl.h>
|
||||
#include <rccl/rccl.h>
|
||||
|
||||
#define PIPE_WRITE(childId, val) \
|
||||
ASSERT_EQ(write(childList[childId]->parentWriteFd, &val, sizeof(val)), sizeof(val))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <vector>
|
||||
#include <unistd.h>
|
||||
#include "CollectiveArgs.hpp"
|
||||
#include "rccl.h"
|
||||
#include "rccl/rccl.h"
|
||||
|
||||
#define MAX_RANKS 32
|
||||
namespace RcclUnitTesting
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする