[TF:XLA] Print the layouts of the shapes because when the check fails, the difference

may be in the layouts.

PiperOrigin-RevId: 243099426
This commit is contained in:
Dimitris Vardoulakis 2019-04-11 10:49:36 -07:00 committed by TensorFlower Gardener
parent 36e10587b5
commit 90a4b1ecfe

View File

@ -424,9 +424,10 @@ Status HloEvaluator::HandleParameter(HloInstruction* parameter) {
const Literal* input_literal = arg_literals_[parameter->parameter_number()]; const Literal* input_literal = arg_literals_[parameter->parameter_number()];
VLOG(2) << "Parameter evaluated to: " << input_literal->ToString(); VLOG(2) << "Parameter evaluated to: " << input_literal->ToString();
DCHECK(ShapeUtil::Equal(parameter->shape(), input_literal->shape())) 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: " << ", but input literal shape is: "
<< ShapeUtil::HumanString(input_literal->shape()); << ShapeUtil::HumanStringWithLayout(input_literal->shape());
#endif #endif
return Status::OK(); return Status::OK();