From 64d88e71f4aca828487c3a28d0f578c45eb60e7b Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Tue, 26 Apr 2022 20:13:06 +0800 Subject: [PATCH] [Performance]Remove redundant op_type in RecordEvent (#42246) * [Performance]Remove redundant op_type in RecordEvent * [Performance]Remove redundant op_type in RecordEvent * [Performance]Remove redundant op_type in RecordEvent --- paddle/fluid/imperative/prepared_operator.cc | 4 ++-- paddle/fluid/imperative/tracer.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/imperative/prepared_operator.cc b/paddle/fluid/imperative/prepared_operator.cc index 6c056605fa..1fef559f21 100644 --- a/paddle/fluid/imperative/prepared_operator.cc +++ b/paddle/fluid/imperative/prepared_operator.cc @@ -444,7 +444,7 @@ static void PreparedOpRunImpl( framework::Scope scope; { - platform::RecordEvent record_event(op.Type() + "::infer_shape", + platform::RecordEvent record_event("infer_shape", platform::TracerEventType::OperatorInner, 1, platform::EventRole::kInnerOp); DygraphInferShapeContext infer_shape_ctx( @@ -454,7 +454,7 @@ static void PreparedOpRunImpl( } { - platform::RecordEvent record_event(op.Type() + "::compute", + platform::RecordEvent record_event("compute", platform::TracerEventType::OperatorInner, 1, platform::EventRole::kInnerOp); diff --git a/paddle/fluid/imperative/tracer.cc b/paddle/fluid/imperative/tracer.cc index 3e2e082fba..47274f8a31 100644 --- a/paddle/fluid/imperative/tracer.cc +++ b/paddle/fluid/imperative/tracer.cc @@ -320,7 +320,7 @@ void Tracer::TraceOpImpl(const std::string& type, { platform::RecordEvent node_creation_record_event( - type + " node_creation", platform::TracerEventType::OperatorInner, 1); + "grad_node_creation", platform::TracerEventType::OperatorInner, 1); if (ComputeRequiredGrad(new_ins, outs, trace_backward)) { PADDLE_ENFORCE_EQ( -- GitLab