From fa5676a41b2c00a4cea37793cf4977cf995ab0c4 Mon Sep 17 00:00:00 2001 From: Pavel Belevich Date: Tue, 31 Aug 2021 20:14:08 -0700 Subject: [PATCH] Delete some dead code from RRefMessageBase (#64298) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64298 cc pietern mrshenli pritamdamania87 zhaojuanmao satgera rohan-varma gqchen aazzolini osalpekar jiayisuse agolynski SciPioneer H-Huang mrzzd cbalioglu gcramer23 Test Plan: Imported from OSS Reviewed By: rohan-varma Differential Revision: D30676702 Pulled By: pbelevich fbshipit-source-id: 77dbc0f8064c3518376454ff573d45ed0274956b --- torch/csrc/distributed/rpc/rref_proto.cpp | 16 +--------------- torch/csrc/distributed/rpc/rref_proto.h | 3 --- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/torch/csrc/distributed/rpc/rref_proto.cpp b/torch/csrc/distributed/rpc/rref_proto.cpp index 6f059b1..49e3287 100644 --- a/torch/csrc/distributed/rpc/rref_proto.cpp +++ b/torch/csrc/distributed/rpc/rref_proto.cpp @@ -46,20 +46,6 @@ const RRefId& RRefMessageBase::rrefId() { return rrefId_; } -c10::intrusive_ptr RRefMessageBase::toMessageImpl() && { - return fromIValues({rrefId_.toIValue()}, type_); -} - -at::IValue RRefMessageBase::fromMessage( - const Message& message, - MessageType type) { - auto values = toIValues(message, type); - - TORCH_INTERNAL_ASSERT( - values.size() == 1, "ScriptUserDelete expects 1 IValue from message."); - return std::move(values.back()); -} - /////////////////////////// ForkMessageBase ////////////////////////////////// const ForkId& ForkMessageBase::forkId() { @@ -76,7 +62,7 @@ std::pair ForkMessageBase::fromMessage( auto ivalues = toIValues(message, type); TORCH_INTERNAL_ASSERT( - ivalues.size() == 2, "ScriptUserDelete expects 2 IValue from message."); + ivalues.size() == 2, "ForkMessageBase expects 2 IValue from message."); return std::make_pair( RRefId::fromIValue(ivalues[0]), ForkId::fromIValue(ivalues[1])); diff --git a/torch/csrc/distributed/rpc/rref_proto.h b/torch/csrc/distributed/rpc/rref_proto.h index d5a82c2..4ce8066 100644 --- a/torch/csrc/distributed/rpc/rref_proto.h +++ b/torch/csrc/distributed/rpc/rref_proto.h @@ -22,9 +22,6 @@ class TORCH_API RRefMessageBase : public RpcCommandBase { const RRefId& rrefId(); - c10::intrusive_ptr toMessageImpl() && override; - static at::IValue fromMessage(const Message& message, MessageType type); - protected: // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) const RRefId rrefId_; -- 2.7.4