diff --git a/tensorflow/core/common_runtime/executor.cc b/tensorflow/core/common_runtime/executor.cc index 15d2a910eb0..f500a3405ab 100644 --- a/tensorflow/core/common_runtime/executor.cc +++ b/tensorflow/core/common_runtime/executor.cc @@ -440,8 +440,7 @@ void ExecutorState::RunTask(Closure&& c) { // mutable is needed because std::forward in the lambda body may move // the Closure `c`. runner_([c = std::forward(c)]() mutable { - auto qlen = queue_length.fetch_sub(1, std::memory_order_relaxed); - metrics::UpdateGraphPendingQueueLength(qlen - 1); + queue_length.fetch_sub(1, std::memory_order_relaxed); std::forward(c)(); }); }