diff options
author | 2016-07-12 09:16:34 -0800 | |
---|---|---|
committer | 2016-07-12 10:32:57 -0700 | |
commit | f2aaead7ce18dcd01dd13e9c15d4e60846568f08 (patch) | |
tree | 6d1b9fb6926614458598c3cd54f6d67e17eb194e | |
parent | f564209aa9b9555d76fafe4091710deba6ed50b1 (diff) |
Bug fix: initialize WorkerCacheLogger::want_logging_count_ to 0.
Without this, collection of detailed execution timing information
would default to being on all the time quite often, resulting in
significant performance and memory allocation overhead.
Reduces number of allocations for one benchmark from 120M to 101M.
Co-discovered by sanjay@ and myself.
Change: 127212900
-rw-r--r-- | tensorflow/core/distributed_runtime/worker_cache_logger.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/distributed_runtime/worker_cache_logger.h b/tensorflow/core/distributed_runtime/worker_cache_logger.h index aed7047203..a92590a176 100644 --- a/tensorflow/core/distributed_runtime/worker_cache_logger.h +++ b/tensorflow/core/distributed_runtime/worker_cache_logger.h @@ -62,7 +62,7 @@ class WorkerCacheLogger { private: mutex count_mu_; - int32 want_logging_count_ GUARDED_BY(count_mu_); + int32 want_logging_count_ GUARDED_BY(count_mu_) = 0; struct StepLog { StepStats step_stats; |