From 90a4b1ecfea75482eee20c3d051757517b5c8001 Mon Sep 17 00:00:00 2001 From: Dimitris Vardoulakis Date: Thu, 11 Apr 2019 10:49:36 -0700 Subject: [PATCH] [TF:XLA] Print the layouts of the shapes because when the check fails, the difference may be in the layouts. PiperOrigin-RevId: 243099426 --- tensorflow/compiler/xla/service/hlo_evaluator.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tensorflow/compiler/xla/service/hlo_evaluator.cc b/tensorflow/compiler/xla/service/hlo_evaluator.cc index 37605366574..d68ecabdbbd 100644 --- a/tensorflow/compiler/xla/service/hlo_evaluator.cc +++ b/tensorflow/compiler/xla/service/hlo_evaluator.cc @@ -424,9 +424,10 @@ Status HloEvaluator::HandleParameter(HloInstruction* parameter) { const Literal* input_literal = arg_literals_[parameter->parameter_number()]; VLOG(2) << "Parameter evaluated to: " << input_literal->ToString(); DCHECK(ShapeUtil::Equal(parameter->shape(), input_literal->shape())) - << "parameter shape is: " << ShapeUtil::HumanString(parameter->shape()) + << "parameter shape is: " + << ShapeUtil::HumanStringWithLayout(parameter->shape()) << ", but input literal shape is: " - << ShapeUtil::HumanString(input_literal->shape()); + << ShapeUtil::HumanStringWithLayout(input_literal->shape()); #endif return Status::OK();