diff options
author | 2017-06-20 11:06:08 -0700 | |
---|---|---|
committer | 2017-06-20 11:10:01 -0700 | |
commit | f9125ff748407c1f9132af572c3927156e754c63 (patch) | |
tree | f024824b988766a3eedda67099d7a97a71af807f | |
parent | 4b967e2244e473e93d2293587cb6abc30414362a (diff) |
Turn off pool allocator logging by default -- most people never know
what to do with the information anyway, and we're moving away from
pool allocator towards BFCAllocator.
PiperOrigin-RevId: 159584606
-rw-r--r-- | tensorflow/core/common_runtime/gpu/pool_allocator.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tensorflow/core/common_runtime/gpu/pool_allocator.cc b/tensorflow/core/common_runtime/gpu/pool_allocator.cc index 700ac34716..66fff16e8f 100644 --- a/tensorflow/core/common_runtime/gpu/pool_allocator.cc +++ b/tensorflow/core/common_runtime/gpu/pool_allocator.cc @@ -239,11 +239,9 @@ void PoolAllocator::EvictOne() { (alloc_request_count == 0) ? 0.0 : allocated_count_ / static_cast<double>(alloc_request_count); - static int log_counter = 0; - // (counter increment not thread safe but it's just for logging, so we - // don't care). - bool should_log = ((log_counter++ % 10) == 0); - if (should_log) { + // Can turn on for debugging purposes. + const bool kShouldLog = false; + if (kShouldLog) { LOG(INFO) << "PoolAllocator: After " << alloc_request_count << " get requests, put_count=" << put_count_ << " evicted_count=" << evicted_count_ @@ -255,7 +253,7 @@ void PoolAllocator::EvictOne() { size_t new_size_limit = (pool_size_limit_ < kMinPoolSize) ? kMinPoolSize : (kIncreaseFactor * pool_size_limit_); - if (should_log) { + if (kShouldLog) { LOG(INFO) << "Raising pool_size_limit_ from " << pool_size_limit_ << " to " << new_size_limit; } |