Skip to content

Commit

Permalink
Fix build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
chhwang committed Mar 19, 2024
1 parent f81d53d commit a075f71
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions apps/nccl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ install(TARGETS mscclpp_nccl
LIBRARY DESTINATION ${INSTALL_PREFIX}/lib)
install(TARGETS mscclpp_nccl_static
ARCHIVE DESTINATION ${INSTALL_PREFIX}/lib)

if(BUILD_TESTS)
add_subdirectory(test)
endif()
6 changes: 6 additions & 0 deletions apps/nccl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

add_executable(nccl_api_test nccl_api_test.cc)
target_link_libraries(nccl_api_test mscclpp ${GPU_LIBRARIES} ${NUMA_LIBRARIES} ${IBVERBS_LIBRARIES} Threads::Threads MPI::MPI_CXX)
target_include_directories(nccl_api_test ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/apps/nccl/include)
File renamed without changes.
5 changes: 2 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

find_package(MPI)

set(TEST_LIBS_COMMON mscclpp_nccl mscclpp ${GPU_LIBRARIES} ${NUMA_LIBRARIES} ${IBVERBS_LIBRARIES} Threads::Threads)
set(TEST_LIBS_COMMON mscclpp ${GPU_LIBRARIES} ${NUMA_LIBRARIES} ${IBVERBS_LIBRARIES} Threads::Threads)
set(TEST_LIBS_GTEST GTest::gtest_main GTest::gmock_main)
set(TEST_INC_COMMON PRIVATE ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/apps/nccl/include ${GPU_INCLUDE_DIRS})
set(TEST_INC_COMMON PRIVATE ${PROJECT_SOURCE_DIR}/include ${GPU_INCLUDE_DIRS})
set(TEST_INC_INTERNAL PRIVATE ${PROJECT_SOURCE_DIR}/src/include)

if(USE_ROCM)
Expand All @@ -24,7 +24,6 @@ endfunction()
add_test_executable(allgather_test_cpp allgather_test_cpp.cu)
add_test_executable(allgather_test_host_offloading allgather_test_host_offloading.cu)
add_test_executable(nvls_test nvls_test.cu)
add_test_executable(nccl_api_test nccl_api_test.cc)

configure_file(run_mpi_test.sh.in run_mpi_test.sh)

Expand Down

0 comments on commit a075f71

Please sign in to comment.