aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler
diff options
context:
space:
mode:
authorGravatar Tim Shen <timshen@google.com>2018-10-08 14:43:55 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-08 14:48:37 -0700
commitaf5b714179ff5e279ba27c024f453e2d75636ac9 (patch)
treebf81913f23c11af6ca4b9f6afd2e471aa1ab3b77 /tensorflow/compiler
parent396a8a4105edd409d0821c4d5d0b920b315ffb72 (diff)
Add more logging to the convolution transformations.
PiperOrigin-RevId: 216252980
Diffstat (limited to 'tensorflow/compiler')
-rw-r--r--tensorflow/compiler/xla/service/gpu/cudnn_convolution_algorithm_picker.cc3
-rw-r--r--tensorflow/compiler/xla/service/gpu/cudnn_convolution_rewriter.cc3
-rw-r--r--tensorflow/compiler/xla/service/gpu/cudnn_fused_convolution_rewriter.cc3
3 files changed, 8 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/gpu/cudnn_convolution_algorithm_picker.cc b/tensorflow/compiler/xla/service/gpu/cudnn_convolution_algorithm_picker.cc
index 590c0a7d54..6d4a72038f 100644
--- a/tensorflow/compiler/xla/service/gpu/cudnn_convolution_algorithm_picker.cc
+++ b/tensorflow/compiler/xla/service/gpu/cudnn_convolution_algorithm_picker.cc
@@ -360,6 +360,9 @@ StatusOr<bool> CudnnConvolutionAlgorithmPicker::RunOnInstruction(
HloInstruction* new_call = computation->AddInstruction(
instr->CloneWithNewOperands(new_call_shape, instr->operands()));
+ VLOG(1) << "Replacing convolution " << instr->ToString() << " with "
+ << new_call->ToString();
+
TF_RETURN_IF_ERROR(new_call->set_backend_config(backend_config));
// Repackage new_call so it has the same shape as the original call, namely
diff --git a/tensorflow/compiler/xla/service/gpu/cudnn_convolution_rewriter.cc b/tensorflow/compiler/xla/service/gpu/cudnn_convolution_rewriter.cc
index ef29237301..437d25727e 100644
--- a/tensorflow/compiler/xla/service/gpu/cudnn_convolution_rewriter.cc
+++ b/tensorflow/compiler/xla/service/gpu/cudnn_convolution_rewriter.cc
@@ -525,6 +525,9 @@ StatusOr<bool> RunOnInstruction(HloInstruction* conv) {
TF_RETURN_IF_ERROR(
custom_call->set_backend_config(GetDefaultBackendConfig()));
+ VLOG(1) << "Replacing convolution " << conv->ToString() << " with "
+ << custom_call->ToString();
+
// The CustomCall returns a tuple (conv_result, scratch_memory). Extract out
// the conv result and replace `conv` with it.
TF_RETURN_IF_ERROR(conv->parent()->ReplaceWithNewInstruction(
diff --git a/tensorflow/compiler/xla/service/gpu/cudnn_fused_convolution_rewriter.cc b/tensorflow/compiler/xla/service/gpu/cudnn_fused_convolution_rewriter.cc
index 3761c19cfc..d508cbc2e1 100644
--- a/tensorflow/compiler/xla/service/gpu/cudnn_fused_convolution_rewriter.cc
+++ b/tensorflow/compiler/xla/service/gpu/cudnn_fused_convolution_rewriter.cc
@@ -234,7 +234,8 @@ StatusOr<std::unique_ptr<HloInstruction>> TryRewriteToCudnnForwardRelu(
config.set_side_input_scale(alpha_side_input);
TF_RETURN_IF_ERROR(new_conv->set_backend_config(config));
- VLOG(1) << "Rewriting " << conv->name() << " to " << new_conv->name();
+ VLOG(1) << "Replacing convolution " << conv->ToString() << " with "
+ << new_conv->ToString();
return HloInstruction::CreateGetTupleElement(conv->shape().tuple_shapes(0),
new_conv, 0);
}