diff options
author | Jacques Pienaar <jpienaar@google.com> | 2018-09-19 10:46:35 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-19 10:55:51 -0700 |
commit | 05ec322172958f6e67e4bcaef4681e6aa54fabeb (patch) | |
tree | 867d22dc1d542726a9d201633c903b7f6e33fe92 /tensorflow/compiler/jit | |
parent | 96e7185cdb399345fb6e4c656d1b3088f848cf5a (diff) |
Return error message with illegal input rather than check-failing in op_kernel.
PiperOrigin-RevId: 213653853
Diffstat (limited to 'tensorflow/compiler/jit')
-rw-r--r-- | tensorflow/compiler/jit/xla_launch_util.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/compiler/jit/xla_launch_util.cc b/tensorflow/compiler/jit/xla_launch_util.cc index affeab4a8c..5f2f6801e7 100644 --- a/tensorflow/compiler/jit/xla_launch_util.cc +++ b/tensorflow/compiler/jit/xla_launch_util.cc @@ -275,6 +275,8 @@ Status XlaComputationLaunchContext::PopulateOutputs( VLOG(2) << "Retval " << i << " shape " << shape.DebugString() << " type " << DataTypeString(type); if (type == DT_RESOURCE) { + TF_RET_CHECK(kernel->outputs[i].input_index >= 0) + << "Invalid input for outputs " << i; ctx->set_output(i, ctx->input(kernel->outputs[i].input_index)); } else { se::DeviceMemoryBase buffer = output.buffer({output_num}); |