diff --git a/tensorflow/compiler/xla/service/gpu/cudnn_conv_algorithm_picker.cc b/tensorflow/compiler/xla/service/gpu/cudnn_conv_algorithm_picker.cc index 9ef5f07d857..6c41c9f3839 100644 --- a/tensorflow/compiler/xla/service/gpu/cudnn_conv_algorithm_picker.cc +++ b/tensorflow/compiler/xla/service/gpu/cudnn_conv_algorithm_picker.cc @@ -178,8 +178,8 @@ struct ConvCacheStats { int64 cache_misses = 0; void LogStats() { - VLOG(1) << "Cache hits: " << cache_hits; - VLOG(1) << "Cache misses: " << cache_misses; + VLOG(2) << "Cache hits: " << cache_hits; + VLOG(2) << "Cache misses: " << cache_misses; } }; @@ -425,6 +425,8 @@ StatusOr CudnnConvAlgorithmPicker::PickBestAlgorithmNoCache( << AlgorithmToString(first_algorithm) << " vs " << AlgorithmToString(alg); PrintPlatformInfo(&stream); + VLOG(1) << "Full module on failure: \n" + << instr->GetModule()->ToString(); auto* fail = result.mutable_failure(); fail->set_kind(AutotuneResult::WRONG_RESULT); auto* reference_conv = fail->mutable_reference_conv(); @@ -462,12 +464,10 @@ StatusOr CudnnConvAlgorithmPicker::PickBestAlgorithmNoCache( *log.mutable_cudnn_version() = GetCudnnVersion(stream_exec_); log.set_device_pci_bus_id( stream_exec_->GetDeviceDescription().pci_bus_id()); + VLOG(1) << "Autotuning result: " << log.ShortDebugString(); // If we crash on checking failure, we are in a testing/benchmark mode, thus - // print more information instead of logging to the logger. - if (crash_on_checking_failure) { - LOG(INFO) << "Autotuning result: " << log.ShortDebugString(); - } else { - VLOG(2) << "Autotuning result:\n" << log.DebugString(); + // omitting logging through the logger. + if (!crash_on_checking_failure) { tensorflow::Logger::Singleton()->LogProto(log); } } @@ -527,7 +527,7 @@ StatusOr CudnnConvAlgorithmPicker::RunOnInstruction( } auto best_algo = std::move(best_algo_or).ValueOrDie(); - VLOG(1) << "Setting cudnn conv to use algorithm " + VLOG(2) << "Setting cudnn conv to use algorithm " << best_algo.conv().algorithm() << " and " << NumBytesToString(best_algo.scratch_bytes()) << " of scratch memory: " << instr->ToString() @@ -548,7 +548,7 @@ StatusOr CudnnConvAlgorithmPicker::RunOnInstruction( HloInstruction* new_call = computation->AddInstruction( instr->CloneWithNewOperands(new_call_shape, instr->operands())); - VLOG(1) << "Replacing convolution " << instr->ToString() << " with " + VLOG(2) << "Replacing convolution " << instr->ToString() << " with " << new_call->ToString(); TF_RETURN_IF_ERROR(new_call->set_backend_config(backend_config));