mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[split build] fix distributed problems (#134502)
Should fix the issue where USE_C10D_NCCL was not getting propagated to libtorch_python.so Pull Request resolved: https://github.com/pytorch/pytorch/pull/134502 Approved by: https://github.com/yifuwang
This commit is contained in:
@ -337,11 +337,17 @@ endif()
|
||||
|
||||
# in case of the split build we need to add compile definitions
|
||||
if(BUILD_LIBTORCHLESS)
|
||||
|
||||
if(USE_UCC)
|
||||
target_link_libraries(torch_python PRIVATE __caffe2_ucc)
|
||||
target_compile_definitions(torch_python PRIVATE USE_UCC)
|
||||
endif()
|
||||
|
||||
if(USE_UCC AND USE_C10D_UCC)
|
||||
target_compile_definitions(torch_python PRIVATE USE_C10D_UCC)
|
||||
endif()
|
||||
|
||||
if(USE_UCC AND USE_C10D_NCCL)
|
||||
if(USE_NCCL AND USE_C10D_NCCL)
|
||||
target_compile_definitions(torch_python PRIVATE USE_C10D_NCCL)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user