diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index d11915fe4314..3b4b6adac94b 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -1166,17 +1166,10 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE) # Tensorpipe uses cuda_add_library torch_update_find_cuda_flags() - if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0") - message(WARNING "Archived TensorPipe forces CMake compatibility mode") - set(CMAKE_POLICY_VERSION_MINIMUM 3.5) - endif() add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe) # Suppress warning to unblock libnop compilation by clang-17 # See https://github.com/pytorch/pytorch/issues/151316 target_compile_options_if_supported(tensorpipe -Wno-missing-template-arg-list-after-template-kw) - if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0") - unset(CMAKE_POLICY_VERSION_MINIMUM) - endif() list(APPEND Caffe2_DEPENDENCY_LIBS tensorpipe) list(APPEND Caffe2_DEPENDENCY_LIBS nlohmann) diff --git a/third_party/tensorpipe b/third_party/tensorpipe index 52791a2fd214..dacda0567d9f 160000 --- a/third_party/tensorpipe +++ b/third_party/tensorpipe @@ -1 +1 @@ -Subproject commit 52791a2fd214b2a9dc5759d36725909c1daa7f2e +Subproject commit dacda0567d9f23d4bc503e1c4f84aa65f33ac38a diff --git a/third_party/tensorpipe.BUILD b/third_party/tensorpipe.BUILD index ece345fda4a2..5e5b69b4cb4e 100644 --- a/third_party/tensorpipe.BUILD +++ b/third_party/tensorpipe.BUILD @@ -7,6 +7,7 @@ LIBUV_COMMON_SRCS = [ "third_party/libuv/src/inet.c", "third_party/libuv/src/random.c", "third_party/libuv/src/strscpy.c", + "third_party/libuv/src/strtok.c", "third_party/libuv/src/threadpool.c", "third_party/libuv/src/timer.c", "third_party/libuv/src/uv-common.c", @@ -37,9 +38,7 @@ LIBUV_POSIX_SRCS = [ LIBUV_LINUX_SRCS = LIBUV_POSIX_SRCS + [ "third_party/libuv/src/unix/proctitle.c", - "third_party/libuv/src/unix/linux-core.c", - "third_party/libuv/src/unix/linux-inotify.c", - "third_party/libuv/src/unix/linux-syscalls.c", + "third_party/libuv/src/unix/linux.c", "third_party/libuv/src/unix/procfs-exepath.c", "third_party/libuv/src/unix/random-getrandom.c", "third_party/libuv/src/unix/random-sysctl-linux.c", @@ -60,6 +59,7 @@ cc_library( "third_party/libuv/src/unix/*.h", ], ), + copts = ["-D_GNU_SOURCE"], visibility = ["//visibility:public"], ) @@ -151,7 +151,7 @@ cc_library( ".", ], copts = [ - "-std=c++14", + "-std=c++17", ], visibility = ["//visibility:public"], deps = [ @@ -168,7 +168,7 @@ cc_library( ".", ], copts = [ - "-std=c++14", + "-std=c++17", ], visibility = ["//visibility:public"], deps = [ diff --git a/torch/csrc/distributed/rpc/tensorpipe_agent.cpp b/torch/csrc/distributed/rpc/tensorpipe_agent.cpp index 190752070250..c25e83c07c6d 100644 --- a/torch/csrc/distributed/rpc/tensorpipe_agent.cpp +++ b/torch/csrc/distributed/rpc/tensorpipe_agent.cpp @@ -8,10 +8,8 @@ #include C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated") -C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi") #include C10_DIAGNOSTIC_POP() -C10_DIAGNOSTIC_POP() #include #include diff --git a/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp b/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp index 03b43184d143..4c326b6a0e27 100644 --- a/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp +++ b/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp @@ -7,12 +7,10 @@ #include #include -C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi") C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated") #include #include C10_DIAGNOSTIC_POP() -C10_DIAGNOSTIC_POP() namespace torch::distributed::rpc { namespace { diff --git a/torch/csrc/distributed/rpc/tensorpipe_utils.cpp b/torch/csrc/distributed/rpc/tensorpipe_utils.cpp index f28aefc06dee..86308ae6cdf3 100644 --- a/torch/csrc/distributed/rpc/tensorpipe_utils.cpp +++ b/torch/csrc/distributed/rpc/tensorpipe_utils.cpp @@ -6,10 +6,8 @@ #include C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated") -C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi") #include C10_DIAGNOSTIC_POP() -C10_DIAGNOSTIC_POP() namespace torch::distributed::rpc { namespace {