Skip to content

Commit 540b453

Browse files
committed
use req_count as atomic type
1 parent 6debbcd commit 540b453

File tree

5 files changed

+1
-19
lines changed

5 files changed

+1
-19
lines changed

paddle/fluid/framework/details/multi_devices_graph_builder.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,6 @@ void MultiDevSSAGraphBuilder::CreateComputationalOp(SSAGraph *result,
298298
CreateOpHandleIOs(result, op, dev_id);
299299
}
300300

301-
OpDesc *MultiDevSSAGraphBuilder::GetSendOpDesc(
302-
const ProgramDesc &program) const {
303-
for (auto *op : program.Block(0).AllOps()) {
304-
if (op->Type() == "send") {
305-
return op;
306-
}
307-
}
308-
return nullptr;
309-
}
310-
311301
void MultiDevSSAGraphBuilder::InsertNCCLAllReduceOp(
312302
SSAGraph *result, const std::string &og) const {
313303
#ifdef PADDLE_WITH_CUDA

paddle/fluid/framework/details/multi_devices_graph_builder.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ class MultiDevSSAGraphBuilder : public SSAGraphBuilder {
107107
void CreateBroadcastOp(SSAGraph *result, const std::string &p_name,
108108
size_t src_dev_id) const;
109109

110-
/**
111-
* Get send op in the global block of program.
112-
* nullptr if not found.
113-
*/
114-
OpDesc *GetSendOpDesc(const ProgramDesc &program) const;
115-
116110
bool IsSparseGradient(
117111
const std::unordered_map<std::string, proto::VarType::Type> &var_types,
118112
const std::string &og) const;

paddle/fluid/operators/detail/grpc_client.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ bool RPCClient::AsyncSendVariable(const std::string& ep,
5959
call->StartCall();
6060
call->Finish(&s->reply_, &s->status_, reinterpret_cast<void*>(s));
6161
});
62-
6362
req_count_++;
6463

6564
return true;

paddle/fluid/operators/detail/grpc_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class RPCClient {
197197
private:
198198
grpc::CompletionQueue cq_;
199199
std::map<std::string, std::shared_ptr<grpc::Channel>> channels_;
200-
int64_t req_count_ = 0;
200+
std::atomic<int64_t> req_count_{0};
201201
std::mutex mutex_;
202202
};
203203

python/paddle/fluid/transpiler/distribute_transpiler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ def transpile(self,
403403
outputs={"Out": [orig_param]},
404404
attrs={"axis": 0})
405405

406-
# TODO(Yancey1989): check dist lookup table
407406
if self.has_distributed_lookup_table:
408407
self._replace_lookup_table_op_with_prefetch(program, rpc_client_var,
409408
eplist)

0 commit comments

Comments
 (0)