Enable TP_USE_CUDA and TP_ENABLE_CUDA_IPC (#46523)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46523

Test Plan: Imported from OSS

Reviewed By: beauby

Differential Revision: D24385830

Pulled By: mrshenli

fbshipit-source-id: 59a40843b4dc1585e176062476da9ab74c84179b
This commit is contained in:
Shen Li 2020-10-19 09:00:12 -07:00 committed by Facebook GitHub Bot
parent 00c779a92b
commit eadc59df55

View File

@ -1308,6 +1308,10 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
if(MSVC) if(MSVC)
message(WARNING "Tensorpipe cannot be used on Windows.") message(WARNING "Tensorpipe cannot be used on Windows.")
else() else()
if(USE_CUDA)
set(TP_USE_CUDA ON CACHE BOOL "" FORCE)
set(TP_ENABLE_CUDA_IPC ON CACHE BOOL "" FORCE)
endif()
set(TP_BUILD_LIBUV ON CACHE BOOL "" FORCE) set(TP_BUILD_LIBUV ON CACHE BOOL "" FORCE)
set(TP_ENABLE_SHM OFF CACHE BOOL "" FORCE) set(TP_ENABLE_SHM OFF CACHE BOOL "" FORCE)
set(TP_ENABLE_CMA OFF CACHE BOOL "" FORCE) set(TP_ENABLE_CMA OFF CACHE BOOL "" FORCE)