diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake index 9c373bb019ec..9006bb0ea084 100644 --- a/cmake/Utils.cmake +++ b/cmake/Utils.cmake @@ -289,7 +289,7 @@ macro(xgboost_target_link_libraries target) endif() if(USE_NVTX) - target_link_libraries(${target} PRIVATE CUDA::nvToolsExt) + target_link_libraries(${target} PRIVATE CUDA::nvtx3) endif() if(MINGW) diff --git a/src/common/timer.cc b/src/common/timer.cc index 2eccc67cd58c..9b1f49fbd5c8 100644 --- a/src/common/timer.cc +++ b/src/common/timer.cc @@ -8,12 +8,10 @@ #include "../collective/communicator-inl.h" #if defined(XGBOOST_USE_NVTX) -#include +#include #endif // defined(XGBOOST_USE_NVTX) -namespace xgboost { -namespace common { - +namespace xgboost::common { void Monitor::Start(std::string const &name) { if (ConsoleLogger::ShouldLog(ConsoleLogger::LV::kDebug)) { auto &stats = statistics_map_[name]; @@ -66,6 +64,4 @@ void Monitor::Print() const { LOG(CONSOLE) << "======== Monitor (" << rank << "): " << label_ << " ========"; this->PrintStatistics(stat_map); } - -} // namespace common -} // namespace xgboost +} // namespace xgboost::common diff --git a/tests/cpp/CMakeLists.txt b/tests/cpp/CMakeLists.txt index 0bbe5e223d2f..2748e13098b6 100644 --- a/tests/cpp/CMakeLists.txt +++ b/tests/cpp/CMakeLists.txt @@ -59,7 +59,6 @@ endif() target_sources(testxgboost PRIVATE ${TEST_SOURCES} ${xgboost_SOURCE_DIR}/plugin/example/custom_obj.cc) if(USE_CUDA AND PLUGIN_RMM) - find_package(CUDA) target_include_directories(testxgboost PRIVATE ${CUDA_INCLUDE_DIRS}) endif()