From aa6f0ace2f32985a4f8710ae5881615fdebe35a6 Mon Sep 17 00:00:00 2001 From: Howard Huang Date: Thu, 9 Feb 2023 10:44:59 -0800 Subject: [PATCH] Remove API declarations in Ops.hpp (#94532) In #91257, we removed direct calls to methods in ops.cpp, so this is updating to also remove ops.hpp Pull Request resolved: https://github.com/pytorch/pytorch/pull/94532 Approved by: https://github.com/kwen2501 --- torch/csrc/distributed/c10d/Ops.cpp | 1 - torch/csrc/distributed/c10d/Ops.hpp | 117 ---------------------------- 2 files changed, 118 deletions(-) delete mode 100644 torch/csrc/distributed/c10d/Ops.hpp diff --git a/torch/csrc/distributed/c10d/Ops.cpp b/torch/csrc/distributed/c10d/Ops.cpp index 4f319f0b221373..b2bd7fe0d42f58 100644 --- a/torch/csrc/distributed/c10d/Ops.cpp +++ b/torch/csrc/distributed/c10d/Ops.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/torch/csrc/distributed/c10d/Ops.hpp b/torch/csrc/distributed/c10d/Ops.hpp deleted file mode 100644 index e414640cccac16..00000000000000 --- a/torch/csrc/distributed/c10d/Ops.hpp +++ /dev/null @@ -1,117 +0,0 @@ -#pragma once - -#include -#include - -namespace c10d { -namespace ops { - -// Below are essentially ProcessGroup's corresponding ops but routed to the -// dispatcher. To be noted, it's a convention to use at::TensorList to represent -// const std::vector&. However, const std::vector& is -// used whenever the API accepts std::vector>& to keep -// consistency. -TORCH_API c10::intrusive_ptr broadcast( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - const BroadcastOptions& opts = {}); - -TORCH_API c10::intrusive_ptr allreduce( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - const AllreduceOptions& opts = {}); - -TORCH_API c10::intrusive_ptr allreduce_coalesced( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - const AllreduceCoalescedOptions& opts = {}); - -TORCH_API c10::intrusive_ptr allgather( - const c10::intrusive_ptr& process_group, - const std::vector>& output_tensors, - at::TensorList input_tensors, - const AllgatherOptions& opts = {}); - -TORCH_API c10::intrusive_ptr _allgather_base( - const c10::intrusive_ptr& process_group, - at::Tensor& outputTensor, - at::Tensor& inputTensor, - const AllgatherOptions& opts = {}); - -TORCH_API c10::intrusive_ptr allgather_coalesced( - const c10::intrusive_ptr& process_group, - const std::vector>& output_lists, - const at::TensorList& input_list, - const AllgatherOptions& opts = {}); - -TORCH_API c10::intrusive_ptr reduce_scatter( - const c10::intrusive_ptr& process_group, - const at::TensorList& output_tensors, - const std::vector>& input_tensors, - const ReduceScatterOptions& opts = {}); - -TORCH_API c10::intrusive_ptr _reduce_scatter_base( - const c10::intrusive_ptr& process_group, - at::Tensor& output_tensor, - at::Tensor& input_tensor, - const ReduceScatterOptions& opts = {}); - -TORCH_API c10::intrusive_ptr reduce( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - const ReduceOptions& opts = {}); - -TORCH_API c10::intrusive_ptr gather( - const c10::intrusive_ptr& process_group, - const std::vector>& output_tensors, - const at::TensorList& input_tensors, - const GatherOptions& opts = {}); - -TORCH_API c10::intrusive_ptr scatter( - const c10::intrusive_ptr& process_group, - const at::TensorList& output_tensors, - const std::vector>& input_tensors, - const ScatterOptions& opts = {}); - -TORCH_API c10::intrusive_ptr alltoall_base( - const c10::intrusive_ptr& process_group, - at::Tensor& output, - at::Tensor& input, - const std::vector outputSplitSizes, - const std::vector inputSplitSizes, - const AllToAllOptions& opts = {}); - -TORCH_API c10::intrusive_ptr alltoall( - const c10::intrusive_ptr& process_group, - const at::TensorList& output_tensors, - const at::TensorList& input_tensors, - const AllToAllOptions& opts = {}); - -TORCH_API c10::intrusive_ptr barrier( - const c10::intrusive_ptr& process_group, - const BarrierOptions& opts = {}); - -TORCH_API void monitored_barrier( - const c10::intrusive_ptr& process_group, - const BarrierOptions& opts, - bool waitAllRanks); - -TORCH_API c10::intrusive_ptr send( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - int64_t dstRank, - int64_t tag); - -TORCH_API c10::intrusive_ptr recv( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - int64_t srcRank, - int64_t tag); - -TORCH_API c10::intrusive_ptr recv_any_source( - const c10::intrusive_ptr& process_group, - at::TensorList tensors, - int64_t tag); - -} // namespace ops -} // namespace c10d