Add more informative logging if TF_RET_CHECK(arg_shape.handle_type != DT_INVALID) fails.

PiperOrigin-RevId: 328434176
Change-Id: Ic7c359c4eb4ff9a77a022a4a94402b1415ac88b7
This commit is contained in:
Ruoxin Sang 2020-08-25 17:09:26 -07:00 committed by TensorFlower Gardener
parent da0d67335f
commit 202e329b58

View File

@ -1568,7 +1568,8 @@ Status DistributedTPURewritePass::GetArgAndRetvalShapes(
arg_shape.shape = TensorShape(); // Variables are always scalars.
arg_shape.handle_shape = info->handle_shape;
arg_shape.handle_type = info->handle_type;
TF_RET_CHECK(arg_shape.handle_type != DT_INVALID);
TF_RET_CHECK(arg_shape.handle_type != DT_INVALID)
<< " input edge: " << input_edges[edge_pos]->DebugString();
++edge_pos;
}