Skip to content

Commit 3b8dd9e

Browse files
committed
optimize code test=develop
1 parent 2921f8a commit 3b8dd9e

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

paddle/fluid/operators/distributed/grpc_variable_response.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include "paddle/fluid/operators/distributed/grpc_variable_response.h"
2323
#include "paddle/fluid/platform/profiler.h"
2424

25-
DEFINE_string(rpc_server_profile_path, "/tmp/profile_ps",
26-
"the profile log file path");
27-
2825
namespace paddle {
2926
namespace operators {
3027
namespace distributed {
@@ -289,7 +286,6 @@ int GRPCVariableResponse::Parse(Source* source) {
289286
platform::EnableProfiler(platform::ProfilerState::kCPU);
290287
} else if (profiling == platform::kDisableProfiler &&
291288
platform::IsProfileEnabled()) {
292-
// TODO(panyx0718): Should we allow to customize file dir.
293289
platform::DisableProfiler(
294290
platform::EventSortingKey::kDefault,
295291
string::Sprintf("%s_%lld", FLAGS_rpc_server_profile_path,

paddle/fluid/operators/distributed/rpc_server.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
#include "paddle/fluid/operators/distributed/request_handler.h"
2525

26-
DECLARE_string(rpc_server_profile_path);
27-
2826
namespace paddle {
2927
namespace operators {
3028
namespace distributed {

paddle/fluid/operators/distributed/variable_response.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#include <vector>
1717
#include "paddle/fluid/operators/distributed/sendrecvop_utils.h"
1818

19+
DEFINE_string(rpc_server_profile_path, "./profile_ps",
20+
"the profile log file path");
21+
1922
namespace paddle {
2023
namespace operators {
2124
namespace distributed {

paddle/fluid/operators/distributed/variable_response.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include "paddle/fluid/framework/tensor.h"
2828
#include "paddle/fluid/operators/distributed/send_recv.pb.h"
2929

30+
DECLARE_string(rpc_server_profile_path);
31+
3032
namespace paddle {
3133
namespace operators {
3234
namespace distributed {

0 commit comments

Comments
 (0)