diff --git a/onnxruntime/core/framework/sequential_executor.cc b/onnxruntime/core/framework/sequential_executor.cc index aa762ca32fdb4..6ea12c7f3336b 100644 --- a/onnxruntime/core/framework/sequential_executor.cc +++ b/onnxruntime/core/framework/sequential_executor.cc @@ -339,12 +339,6 @@ class KernelScope { if (session_state_.Profiler().IsEnabled()) { auto& node = kernel.Node(); node_name_ = node.Name().empty() ? MakeString(node.OpType(), "_", node.Index()) : node.Name(); - auto& profiler = session_state_.Profiler(); - auto sync_time_begin = profiler.Start(); - profiler.EndTimeAndRecordEvent(profiling::NODE_EVENT, - node_name_ + "_fence_before", - sync_time_begin, - {{"op_name", kernel_.KernelDef().OpName()}}); concurrency::ThreadPool::StartProfiling(session_state_.GetThreadPool()); VLOGS(session_state_.Logger(), 1) << "Computing kernel: " << node_name_; kernel_begin_time_ = session_state_.Profiler().Start(); @@ -381,11 +375,6 @@ class KernelScope { {"thread_scheduling_stats", concurrency::ThreadPool::StopProfiling(session_state_.GetThreadPool())}, }); - auto sync_time_begin = profiler.Start(); - profiler.EndTimeAndRecordEvent(profiling::NODE_EVENT, - node_name_ + "_fence_after", - sync_time_begin, - {{"op_name", kernel_.KernelDef().OpName()}}); } #ifdef ONNXRUNTIME_ENABLE_INSTRUMENT diff --git a/onnxruntime/test/framework/inference_session_test.cc b/onnxruntime/test/framework/inference_session_test.cc index 8b230db351edc..61a8f7e23fe87 100644 --- a/onnxruntime/test/framework/inference_session_test.cc +++ b/onnxruntime/test/framework/inference_session_test.cc @@ -765,7 +765,7 @@ TEST(InferenceSessionTests, CheckRunProfilerWithStartProfile) { while (std::getline(profile, line)) { if (count == 0) { ASSERT_TRUE(line.find("[") != string::npos); - } else if (count <= 5) { + } else if (count <= 3) { for (auto& s : tags) { ASSERT_TRUE(line.find(s) != string::npos); } @@ -774,7 +774,7 @@ TEST(InferenceSessionTests, CheckRunProfilerWithStartProfile) { } if (count == 1) { - ASSERT_TRUE(line.find("mul_1_fence_before") != string::npos); + ASSERT_TRUE(line.find("mul_1_kernel_time") != string::npos); } count++; }