Implement out of bounds behavior for gather in the HLO evaluator
authorSanjoy Das <sanjoy@google.com>
Fri, 16 Mar 2018 04:33:44 +0000 (21:33 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 16 Mar 2018 04:37:41 +0000 (21:37 -0700)
commit4c1081cfddbba33dbd12a28635265bc718697e23
treee71764a22c8e684575f0fedd12e0f7af77e39d07
parent6b9eebb0c024ee3500fef5ec8019c7b5ee4cb6c3
Implement out of bounds behavior for gather in the HLO evaluator

This makes the OOB behavior of gather in the HLO evaluator consistent with
DynamicSlice while we figure out the semantics we want long term.

The HLO->HLO gather expander inherits the wrapping behavior of dynamic-slice
because it lowers the gather ops to loops of dynamic slices.

PiperOrigin-RevId: 189293175
tensorflow/compiler/xla/service/hlo_evaluator.cc
tensorflow/compiler/xla/tests/gather_operation_test.cc