From 6b3371e0c7b47fc7965c84b98d7d826b8475844a Mon Sep 17 00:00:00 2001 From: Chengmo Date: Sat, 20 Feb 2021 23:59:40 +0800 Subject: [PATCH] Remove PE special profiler (#30886) * remove pe special profiler * add profiler info --- paddle/fluid/distributed/service/communicator.cc | 3 +++ paddle/fluid/framework/parallel_executor.cc | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/distributed/service/communicator.cc b/paddle/fluid/distributed/service/communicator.cc index 1b05e3e72b..aea758a717 100644 --- a/paddle/fluid/distributed/service/communicator.cc +++ b/paddle/fluid/distributed/service/communicator.cc @@ -372,6 +372,7 @@ void Communicator::SendGlobalStep(const CommContext &ctx, int batches, if (batches == 0) { return; } + platform::RecordEvent record_event("Communicator->SendGlobalStep"); auto &table_id = ctx.table_id; size_t request_call_num = _worker_ptr->get_server_nums(); @@ -775,6 +776,7 @@ void SyncCommunicator::BarrierRecv() { void GeoCommunicator::Send(const std::vector &var_names, const framework::Scope &scope) { + platform::RecordEvent record_event("GeoCommunicator->Send"); waiting_ = false; auto before_send = GetCurrentUS(); auto table_name = var_names[0]; @@ -1011,6 +1013,7 @@ void GeoCommunicator::InitSparse(const std::string &var_name, int table_id) { std::vector GeoCommunicator::MergeSparseIds( const std::string &send_varname) { + platform::RecordEvent record_event("GeoCommunicator->MergeSparseIds"); size_t merge_num = 0, wait_times = 0; std::unordered_set sparse_ids; while (merge_num < static_cast(max_merge_var_num_)) { diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 6e1e7146ba..83e812de39 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -1122,8 +1122,6 @@ void ParallelExecutor::BCastParamsToDevices( FetchResultType ParallelExecutor::Run( const std::vector &fetch_tensors, bool return_merged) { VLOG(3) << "enter ParallelExecutor Run"; - platform::RecordEvent parallel_executor_event( - "ParallelExecutor::Run", paddle::platform::EventRole::kSpecial); #ifdef WITH_GPERFTOOLS if (gProfileStarted) { ProfilerFlush(); -- GitLab