aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/literal_util.h
diff options
context:
space:
mode:
authorGravatar Sanjoy Das <sanjoy@google.com>2018-03-06 12:15:47 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-06 12:19:43 -0800
commitaa129d523f27739c98032fb08346def395b1afda (patch)
treec33d4ced18192344822e730a7cd01a047e6f370b /tensorflow/compiler/xla/literal_util.h
parenta8bd3677077ffbcae4416b5a18b50d128cbf3a46 (diff)
Add HLO evaluator support for Gather
This isn't optimal -- it copies element by element -- but I figured, at least for bringup, it will be helpful to have the HLO evaluator follow the spec closely. PiperOrigin-RevId: 188061274
Diffstat (limited to 'tensorflow/compiler/xla/literal_util.h')
-rw-r--r--tensorflow/compiler/xla/literal_util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/literal_util.h b/tensorflow/compiler/xla/literal_util.h
index cdc5d807e0..d525487733 100644
--- a/tensorflow/compiler/xla/literal_util.h
+++ b/tensorflow/compiler/xla/literal_util.h
@@ -262,6 +262,11 @@ class Literal {
tensorflow::gtl::ArraySlice<int64> dest_base,
tensorflow::gtl::ArraySlice<int64> copy_size);
+ // Copies one element from src_literal[src_index] to (*this)[dest_index].
+ Status CopyElementFrom(const Literal& src_literal,
+ tensorflow::gtl::ArraySlice<int64> src_index,
+ tensorflow::gtl::ArraySlice<int64> dest_index);
+
// Returns a vector containing the tuple elements of this Literal as separate
// Literals. This Literal must be tuple-shaped and can be a nested tuple. The
// elements are moved into the new Literals; no data is copied. Upon return