未验证 提交 727dcbd9 编写于 作者: C chenjian 提交者: GitHub

Fix dygraph record event position (#41445) (#41608)

* no

* maintain old profiler

* fix old dygraph record event
上级 e4dcf0bf
......@@ -826,6 +826,8 @@ std::vector<std::shared_ptr<VarBase>> PartialGradTask::Run() {
}
void PartialGradTask::RunEachOp(OpBase *op) {
platform::RecordEvent op_type_record_event(
op->Type() + " grad trace_op", platform::TracerEventType::Operator, 1);
// Prepare new inputs
NameVarMap<VarBase> tmp_ins;
for (auto &input_pair : op->GetInsMap()) {
......@@ -908,7 +910,6 @@ void PartialGradTask::RunEachOp(OpBase *op) {
// Run op
OpBase::Run(op->InnerOp(), tmp_ins, tmp_outs, op->Attrs(),
op->DefaultAttrsMap(), op->place());
if (create_graph_) {
auto double_grad_node =
CreateGradOpNode(op->InnerOp(), tmp_ins, tmp_outs, op->Attrs(),
......
......@@ -313,7 +313,7 @@ void Tracer::TraceOpImpl(const std::string& type,
{
platform::RecordEvent node_creation_record_event(
type + " node_creation", platform::TracerEventType::Operator, 1);
type + " node_creation", platform::TracerEventType::OperatorInner, 1);
if (ComputeRequiredGrad(new_ins, outs, trace_backward)) {
PADDLE_ENFORCE_EQ(
......
......@@ -325,7 +325,7 @@ void ChromeTracingLogger::HandleTypeKernel(
"name": "%s[%s]", "pid": %lld, "tid": %lld,
"ts": %lld, "dur": %.3f,
"ph": "X", "cat": "%s",
"cname": "rail_animation",
"cname": "cq_build_failed",
"args": {
"start_time": "%.3f us",
"end_time": "%.3f us",
......@@ -376,7 +376,7 @@ void ChromeTracingLogger::HandleTypeMemcpy(
"name": "%s[%s]", "pid": %lld, "tid": %lld,
"ts": %lld, "dur": %.3f,
"ph": "X", "cat": "%s",
"cname": "rail_animation",
"cname": "cq_build_failed",
"args": {
"start_time": "%.3f us",
"end_time": "%.3f us",
......@@ -411,7 +411,7 @@ void ChromeTracingLogger::HandleTypeMemset(
"name": "%s[%s]", "pid": %lld, "tid": %lld,
"ts": %lld, "dur": %.3f,
"ph": "X", "cat": "%s",
"cname": "rail_animation",
"cname": "cq_build_failed",
"args": {
"start_time": "%.3f us",
"end_time": "%.3f us",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册