Add a type-erased broadcast implementation to xla::Literal
authorSanjoy Das <sanjoy@google.com>
Sat, 26 May 2018 00:46:19 +0000 (17:46 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Sat, 26 May 2018 00:48:50 +0000 (17:48 -0700)
commitb4423efd55c5e463dd70d6975aa3a9d0f260011b
tree44b03f53e867a1732224d2e65a37075b2ed742d5
parenta6eb244b2b8ee4d9592a705c4bc0771e4d708565
Add a type-erased broadcast implementation to xla::Literal

And use this in HLO evaluator.  Since broadcast only moves bytes around we don't
need a type specialized implementation.

I'll use this in a later change.

PiperOrigin-RevId: 198128524
tensorflow/compiler/xla/literal_util.cc
tensorflow/compiler/xla/literal_util.h
tensorflow/compiler/xla/literal_util_test.cc
tensorflow/compiler/xla/service/hlo_evaluator.cc
tensorflow/compiler/xla/service/hlo_evaluator.h
tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h
tensorflow/compiler/xla/shape_util.h