diff options
author | Adrian Kuegel <akuegel@google.com> | 2018-07-11 05:18:37 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-11 05:22:40 -0700 |
commit | 91b5fcd19611789313c8f29c05ee8661ae2bfcb4 (patch) | |
tree | c384a20f094d2116bfa83d7d1b0177789de7ccf0 /tensorflow/compiler/xla/service/hlo_evaluator.cc | |
parent | ab39198aceb641d7be631ba85091a4139edf203f (diff) |
Fix DCHECK off-by-one error.
We should use DCHECK_GE instead of DCHECK_GT.
PiperOrigin-RevId: 204107900
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_evaluator.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_evaluator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_evaluator.cc b/tensorflow/compiler/xla/service/hlo_evaluator.cc index c5f6fe3fd8..dfdfeb49a2 100644 --- a/tensorflow/compiler/xla/service/hlo_evaluator.cc +++ b/tensorflow/compiler/xla/service/hlo_evaluator.cc @@ -892,7 +892,7 @@ Status HloEvaluator::HandleGather(HloInstruction* gather) { } for (int i = 0, e = input_index.size(); i < e; i++) { input_index[i] = input_gather_index_clamped[i] + input_window_index[i]; - DCHECK_GT(input_index[i], 0); + DCHECK_GE(input_index[i], 0); DCHECK_LT(input_index[i], operand_shape.dimensions(i)); } TF_RETURN_IF_ERROR( |