In the overloaded HloVerifier::CheckShape, include the failing instruction in

the error message.

PiperOrigin-RevId: 173965368
This commit is contained in:
A. Unique TensorFlower
2017-10-30 16:09:32 -07:00
committed by TensorFlower Gardener
parent 302ab0ff76
commit f9a673cb71

View File

@@ -359,7 +359,10 @@ class ShapeVerifier : public DfsHloVisitor {
Status CheckShape(const HloInstruction* instruction,
const StatusOr<Shape>& expected_shape_status) {
if (!expected_shape_status.ok()) {
return expected_shape_status.status();
Status s = expected_shape_status.status();
tensorflow::errors::AppendToMessage(&s, ", for instruction ",
instruction->ToString());
return s;
}
return CheckShape(instruction, expected_shape_status.ValueOrDie());
}