aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/literal_test.cc
diff options
context:
space:
mode:
authorGravatar Justin Lebar <jlebar@google.com>2018-08-20 20:20:14 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-20 20:23:24 -0700
commite924d67bff8c4fb58c8316d00b662f8d1e80eb95 (patch)
treebf1b0f5b9d0c699150295f98187b19d6a10710a6 /tensorflow/compiler/xla/literal_test.cc
parent49115abfd39d30506679d9fdc572ccd2f7c22dbe (diff)
[XLA] Use absl::make_unique instead of xla::MakeUnique.
Same for WrapUnique. PiperOrigin-RevId: 209531124
Diffstat (limited to 'tensorflow/compiler/xla/literal_test.cc')
-rw-r--r--tensorflow/compiler/xla/literal_test.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/tensorflow/compiler/xla/literal_test.cc b/tensorflow/compiler/xla/literal_test.cc
index e8f919950f..c5d0c2c267 100644
--- a/tensorflow/compiler/xla/literal_test.cc
+++ b/tensorflow/compiler/xla/literal_test.cc
@@ -17,6 +17,7 @@ limitations under the License.
#include <vector>
+#include "absl/memory/memory.h"
#include "tensorflow/compiler/tf2xla/shape_util.h"
#include "tensorflow/compiler/xla/array3d.h"
#include "tensorflow/compiler/xla/array4d.h"
@@ -355,15 +356,15 @@ TEST_F(LiteralUtilTest, TokenEquality) {
TEST_F(LiteralUtilTest, DifferentLayoutEquality) {
// Test equality with literals which have different layouts.
- auto colmajor =
- MakeUnique<Literal>(ShapeUtil::MakeShapeWithLayout(F32, {2, 2}, {0, 1}));
+ auto colmajor = absl::make_unique<Literal>(
+ ShapeUtil::MakeShapeWithLayout(F32, {2, 2}, {0, 1}));
colmajor->Set<float>({0, 0}, 1.0);
colmajor->Set<float>({0, 1}, 2.0);
colmajor->Set<float>({1, 0}, 3.0);
colmajor->Set<float>({1, 1}, 4.0);
- auto rowmajor =
- MakeUnique<Literal>(ShapeUtil::MakeShapeWithLayout(F32, {2, 2}, {1, 0}));
+ auto rowmajor = absl::make_unique<Literal>(
+ ShapeUtil::MakeShapeWithLayout(F32, {2, 2}, {1, 0}));
rowmajor->Set<float>({0, 0}, 1.0);
rowmajor->Set<float>({0, 1}, 2.0);
rowmajor->Set<float>({1, 0}, 3.0);
@@ -1089,7 +1090,7 @@ TEST_F(LiteralUtilTest, Populate) {
Shape shape = ShapeUtil::MakeShapeWithLayout(
primitive_util::NativeToPrimitiveType<uint32>(), data.dimensions,
data.layout);
- auto literal = MakeUnique<Literal>(shape);
+ auto literal = absl::make_unique<Literal>(shape);
auto generator = [&](ArraySlice<int64> indexes) -> uint32 {
// Offsets from linear index just to avoid R0 literals to be initialized
// with zero.
@@ -1131,7 +1132,7 @@ TEST_F(LiteralUtilTest, PopulateParallel) {
Shape shape = ShapeUtil::MakeShapeWithLayout(
primitive_util::NativeToPrimitiveType<uint32>(), data.dimensions,
data.layout);
- auto literal = MakeUnique<Literal>(shape);
+ auto literal = absl::make_unique<Literal>(shape);
auto generator = [&](ArraySlice<int64> indexes) -> uint32 {
// Offsets from linear index just to avoid R0 literals to be initialized
// with zero.