From b7eeef2489933ba697fd368a6a9c41a361d01bbc Mon Sep 17 00:00:00 2001 From: kavyasrinet Date: Mon, 22 Jan 2018 14:33:41 -0800 Subject: [PATCH] Updating the comments for send_op and recv_op. (#7747) * Updating the cluster trainign doc * Fixed comments * Updating few comments in recv_op --- paddle/operators/recv_op.cc | 16 ++++++++-------- paddle/operators/send_op.cc | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/paddle/operators/recv_op.cc b/paddle/operators/recv_op.cc index 603608073..593c35879 100644 --- a/paddle/operators/recv_op.cc +++ b/paddle/operators/recv_op.cc @@ -49,7 +49,7 @@ static void CreateTensorFromMessageType(framework::Variable *var, var->GetMutable(); } else { PADDLE_THROW( - "VraibleMessage type %d is not in " + "VariableMessage type %d is not in " "[LoDTensor, SelectedRows]", var_type); } @@ -121,17 +121,17 @@ class RecvOp : public framework::OperatorBase { if (it != grad_list.end()) { param_var_name = param_list[it - grad_list.begin()]; } else { - LOG(ERROR) << "grad have no paired param:" << grad_var_name; + LOG(ERROR) << "grad has no paired param:" << grad_var_name; } - VLOG(3) << "recved grad: " << grad_var_name + VLOG(3) << "received grad: " << grad_var_name << " updating param: " << param_var_name; if (fan_in > 1) { grad_var_name = this->GetGradVarNameForTrainer(grad_var_name); } auto *var = recv_scope.FindVar(grad_var_name); if (var == nullptr) { - LOG(ERROR) << "can not find server side var: " << grad_var_name; - PADDLE_THROW("can not find server side var"); + LOG(ERROR) << "Can not find server side var: " << grad_var_name; + PADDLE_THROW("Can not find server side var"); } detail::DeserializeFromMessage(v.second, dev_ctx, var); } @@ -165,7 +165,7 @@ class RecvOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( Recv operator -This operator will recv tensor from send_op +This operator will recieve tensor from send_op )DOC"); AddAttr("endpoint", "(string, default 127.0.0.1:6164)" @@ -176,11 +176,11 @@ This operator will recv tensor from send_op kOptimizeBlock, "Serialized ProgramDesc string for recv to run."); AddAttr>( "ParamList", "type list of string", - "grad->param name mapping to find which param to optimize.") + "grad->param name mapping to find which parameters to optimize.") .SetDefault({}); AddAttr>( "GradList", "type list of string", - "grad->param name mapping to find which param to optimize.") + "grad->param name mapping to find which parameters to optimize.") .SetDefault({}); AddAttr("Fanin", "type int", "Number of trainers in the current cluster job") diff --git a/paddle/operators/send_op.cc b/paddle/operators/send_op.cc index 807533a6c..5aa66c20e 100644 --- a/paddle/operators/send_op.cc +++ b/paddle/operators/send_op.cc @@ -62,13 +62,13 @@ class SendOpMaker : public framework::OpProtoAndCheckerMaker { public: SendOpMaker(OpProto* proto, OpAttrChecker* op_checker) : OpProtoAndCheckerMaker(proto, op_checker) { - AddInput("X", "(Tensor) Input tensor to be send").AsDuplicable(); - AddOutput("Out", "(Tensor) Output tensor to get from server") + AddInput("X", "(Tensor) Input tensor to be sent").AsDuplicable(); + AddOutput("Out", "(Tensor) Output tensor to be received from server") .AsDuplicable(); AddComment(R"DOC( Send operator -This operator will send tensor to recv_op. +This operator will send tensor to recv_op at the parameter server. )DOC"); AddAttr>("endpoints", "(string vector, default 127.0.0.1:6164)" -- GitLab