[BUILD] Use fmt-header instead of libfmt (#1791)

This commit is contained in:
Nilesh M Negi
2025-07-10 17:19:53 -05:00
کامیت شده توسط GitHub
والد f839e4edef
کامیت 6b4ad0fd74
5فایلهای تغییر یافته به همراه8 افزوده شده و 5 حذف شده
+1 -1
مشاهده پرونده
@@ -1091,7 +1091,7 @@ target_link_libraries(rccl INTERFACE hip::host)
target_link_libraries(rccl PRIVATE hip::device)
target_link_libraries(rccl PRIVATE dl)
target_link_libraries(rccl PRIVATE ${ROCM_SMI_LIBRARIES})
target_link_libraries(rccl PRIVATE fmt::fmt)
target_link_libraries(rccl PRIVATE fmt::fmt-header-only)
if(ENABLE_MSCCLPP)
target_link_libraries(rccl PRIVATE mscclpp_nccl)
endif()
+2 -1
مشاهده پرونده
@@ -119,6 +119,7 @@ set(CMAKE_INSTALL_LIBDIR lib CACHE STRING "Define install directory for librarie
# Find or download/install fmt
find_package(fmt QUIET)
if(NOT fmt_FOUND)
set(FMT_INSTALL OFF)
message(STATUS "fmt not found, fetching from source...")
FetchContent_Declare(
fmt
@@ -128,7 +129,7 @@ if(NOT fmt_FOUND)
FetchContent_MakeAvailable(fmt)
else()
message(STATUS "Using system fmt")
get_target_property(FMT_INCLUDE_DIRS fmt::fmt INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(FMT_INCLUDE_DIRS fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "fmt include directories: ${FMT_INCLUDE_DIRS}")
endif()
@@ -10,6 +10,9 @@
#include <chrono>
#include <cstdint>
#include <deque>
#ifndef FMT_HEADER_ONLY
#define FMT_HEADER_ONLY 1
#endif
#include <fmt/format.h>
#include <memory>
#include <unordered_map>
@@ -9,7 +9,6 @@
#include "debug.h"
#include "device.h"
#include "proxy.h"
#include <fmt/format.h>
#include <map>
constexpr int32_t kFinishedProxyOpItems = 32;
@@ -261,4 +260,4 @@ void facebook_rccl::addNewProxyOp(std::unique_ptr<ProxyTrace> &proxyTraceObj,
proxyTraceObj->addNewProxyTraceOpImpl(key, extraInfo, opType, channelId,
nSteps, nbytes, peerRank);
}
}
}
+1 -1
مشاهده پرونده
@@ -97,7 +97,7 @@ if(BUILD_TESTS)
target_link_libraries(rccl-UnitTests PRIVATE hip::host hip::device hsa-runtime64::hsa-runtime64)
target_link_libraries(rccl-UnitTests PRIVATE Threads::Threads)
target_link_libraries(rccl-UnitTests PRIVATE dl)
target_link_libraries(rccl-UnitTests PRIVATE fmt::fmt)
target_link_libraries(rccl-UnitTests PRIVATE fmt::fmt-header-only)
if(OPENMP_TESTS_ENABLED)
target_link_libraries(rccl-UnitTests PRIVATE "${OpenMP_CXX_FLAGS}")
endif()