mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] Update TensorPipe pin (#159834)
No functional changes, just: - Update C++ standard to C++17 - Update `cmake` min version to 3.18 - Update `libuv` dependency to 1.51 (to move its cmake min version to 3.10) - Replace boost optional implementation with `std::optional` wrapper - Make it compilable with gcc-14.x plus by including `cstddef` in few headers - Avoid using deprecated enums for MacOS builds Pull Request resolved: https://github.com/pytorch/pytorch/pull/159834 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
eb25a95a6e
commit
9b953bb3fb
@ -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)
|
||||
|
2
third_party/tensorpipe
vendored
2
third_party/tensorpipe
vendored
Submodule third_party/tensorpipe updated: 52791a2fd2...dacda0567d
10
third_party/tensorpipe.BUILD
vendored
10
third_party/tensorpipe.BUILD
vendored
@ -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 = [
|
||||
|
@ -8,10 +8,8 @@
|
||||
|
||||
#include <fmt/format.h>
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi")
|
||||
#include <tensorpipe/tensorpipe.h>
|
||||
C10_DIAGNOSTIC_POP()
|
||||
C10_DIAGNOSTIC_POP()
|
||||
|
||||
#include <torch/csrc/distributed/rpc/agent_utils.h>
|
||||
#include <torch/csrc/distributed/rpc/tensorpipe_utils.h>
|
||||
|
@ -7,12 +7,10 @@
|
||||
#include <c10/cuda/CUDAGuard.h>
|
||||
#include <c10/cuda/CUDAStream.h>
|
||||
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi")
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
|
||||
#include <tensorpipe/tensorpipe.h>
|
||||
#include <tensorpipe/tensorpipe_cuda.h>
|
||||
C10_DIAGNOSTIC_POP()
|
||||
C10_DIAGNOSTIC_POP()
|
||||
|
||||
namespace torch::distributed::rpc {
|
||||
namespace {
|
||||
|
@ -6,10 +6,8 @@
|
||||
#include <limits>
|
||||
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi")
|
||||
#include <tensorpipe/tensorpipe.h>
|
||||
C10_DIAGNOSTIC_POP()
|
||||
C10_DIAGNOSTIC_POP()
|
||||
|
||||
namespace torch::distributed::rpc {
|
||||
namespace {
|
||||
|
Reference in New Issue
Block a user