aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/reshape_mover_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-06-19 10:48:05 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-19 10:54:20 -0700
commit46737e4e81314f7482bfd6a710f126a27f5d7975 (patch)
tree5e441f99cfe123f3b7a70ffcb79f7b308a5e04c8 /tensorflow/compiler/xla/service/reshape_mover_test.cc
parent09d090282667e28ed04547ee0dcf1b6faba75659 (diff)
Remove class xla::LiteralUtil. NFC (mind-numbingly so).
This patch removes class xla::LiteralUtil and rewrites every call to use class xla::Literal instead. PiperOrigin-RevId: 159446373
Diffstat (limited to 'tensorflow/compiler/xla/service/reshape_mover_test.cc')
-rw-r--r--tensorflow/compiler/xla/service/reshape_mover_test.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/tensorflow/compiler/xla/service/reshape_mover_test.cc b/tensorflow/compiler/xla/service/reshape_mover_test.cc
index 9becdb2bed..49c1755520 100644
--- a/tensorflow/compiler/xla/service/reshape_mover_test.cc
+++ b/tensorflow/compiler/xla/service/reshape_mover_test.cc
@@ -84,7 +84,7 @@ TEST_F(ReshapeMoverTest, 1ConstantAnd1ReshapesOnRngNotMoved) {
builder.AddInstruction(HloInstruction::CreateReshape(root_shape, rng0));
auto const1 = builder.AddInstruction(
- HloInstruction::CreateConstant(LiteralUtil::CreateFromShape(root_shape)));
+ HloInstruction::CreateConstant(Literal::CreateFromShape(root_shape)));
builder.AddInstruction(HloInstruction::CreateBinary(
root_shape, HloOpcode::kAdd, reshape0, const1));
@@ -179,9 +179,8 @@ TEST_F(ReshapeMoverTest, EquivalentReshapesMoved) {
TEST_F(ReshapeMoverTest, 1ConstantAnd2ReshapesMoved) {
HloComputation::Builder builder(TestName());
auto root_shape = ShapeUtil::MakeShape(F32, {2, 3});
- auto const0 = builder.AddInstruction(
- HloInstruction::CreateConstant(LiteralUtil::CreateR2<bool>(
- {{true, true, false}, {false, false, true}})));
+ auto const0 = builder.AddInstruction(HloInstruction::CreateConstant(
+ Literal::CreateR2<bool>({{true, true, false}, {false, false, true}})));
auto param1 = builder.AddInstruction(HloInstruction::CreateParameter(
0, ShapeUtil::MakeShape(F32, {1, 3, 1, 2}), "param1"));
@@ -263,12 +262,12 @@ TEST_F(ReshapeMoverTest, 2TrivialConstantReshapeNotMoved) {
HloComputation::Builder builder(TestName());
auto root_shape = ShapeUtil::MakeShape(F32, {2, 3});
auto const0 = builder.AddInstruction(HloInstruction::CreateConstant(
- LiteralUtil::CreateR2<float>({{1, 2, 3}, {4, 5, 6}})));
+ Literal::CreateR2<float>({{1, 2, 3}, {4, 5, 6}})));
auto reshape0 =
builder.AddInstruction(HloInstruction::CreateReshape(root_shape, const0));
auto const1 = builder.AddInstruction(HloInstruction::CreateConstant(
- LiteralUtil::CreateR2<float>({{1, 2, 3}, {4, 5, 6}})));
+ Literal::CreateR2<float>({{1, 2, 3}, {4, 5, 6}})));
auto reshape1 =
builder.AddInstruction(HloInstruction::CreateReshape(root_shape, const1));
@@ -318,7 +317,7 @@ TEST_F(ReshapeMoverTest, 1NonTrivialReshapeMoved) {
auto param0 = builder.AddInstruction(HloInstruction::CreateParameter(
0, ShapeUtil::MakeShape(F32, {1, 3, 1, 2}), "param0"));
auto const1 = builder.AddInstruction(HloInstruction::CreateConstant(
- LiteralUtil::CreateR2<float>({{1, 2, 3}, {4, 5, 6}})));
+ Literal::CreateR2<float>({{1, 2, 3}, {4, 5, 6}})));
auto reshape0 =
builder.AddInstruction(HloInstruction::CreateReshape(root_shape, param0));
builder.AddInstruction(HloInstruction::CreateBinary(
@@ -464,7 +463,7 @@ TEST_F(ReshapeMoverTest, ImplicitlyBroadcastReshapeIsNotMovedBug37787999) {
auto reshape = builder.AddInstruction(HloInstruction::CreateReshape(
ShapeUtil::MakeShape(F32, {128, 1}), param0));
Array2D<float> a(128, 1024);
- auto literal = LiteralUtil::CreateR2FromArray2D<float>(a);
+ auto literal = Literal::CreateR2FromArray2D<float>(a);
auto constant = builder.AddInstruction(
HloInstruction::CreateConstant(std::move(literal)));
auto multiply = builder.AddInstruction(HloInstruction::CreateBinary(