Skip to content

Commit 9d477c9

Browse files
committed
dynamically link NVSHMEM
1 parent 026c8a9 commit 9d477c9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

csrc/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ target_link_libraries(pplx_kernels PUBLIC
6565
Python::Module
6666
CUDA::cuda_driver
6767
CUDA::cudart
68-
nvshmem::nvshmem
68+
nvshmem::nvshmem_host
69+
nvshmem::nvshmem_device
6970
)
7071
set_target_properties(pplx_kernels PROPERTIES
7172
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../src/pplx_kernels

csrc/all_to_all/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ add_library(all_to_all_lib STATIC
77
internode.cpp
88
)
99
target_link_libraries(all_to_all_lib PUBLIC
10-
nvshmem::nvshmem
10+
nvshmem::nvshmem_host
11+
nvshmem::nvshmem_device
1112
CUDA::cudart
1213
)
1314
set_cuda_compile_options(all_to_all_lib)
@@ -22,7 +23,8 @@ if(WITH_TESTS)
2223
CUDA::cudart
2324
CUDA::cuda_driver
2425
MPI::MPI_CXX
25-
nvshmem::nvshmem
26+
nvshmem::nvshmem_host
27+
nvshmem::nvshmem_device
2628
)
2729
set_cuda_compile_options(test_all_to_all)
2830
add_test(NAME AllToAllTest
@@ -39,6 +41,7 @@ if (WITH_BENCHMARKS)
3941
CUDA::cudart
4042
CUDA::cuda_driver
4143
MPI::MPI_CXX
42-
nvshmem::nvshmem
44+
nvshmem::nvshmem_host
45+
nvshmem::nvshmem_device
4346
)
4447
endif()

csrc/bindings/nvshmem.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ int64_t init(at::Tensor uid, int64_t rank, int64_t world_size) {
2828
TORCH_CHECK(
2929
uid.numel() == sizeof(nvshmemx_uniqueid_t),
3030
"Invalid unique id size (expected ",
31-
3231
sizeof(nvshmemx_uniqueid_t),
3332
", got ",
3433
uid.numel(),

0 commit comments

Comments
 (0)