diff options
author | 2018-08-20 20:20:14 -0700 | |
---|---|---|
committer | 2018-08-20 20:23:24 -0700 | |
commit | e924d67bff8c4fb58c8316d00b662f8d1e80eb95 (patch) | |
tree | bf1b0f5b9d0c699150295f98187b19d6a10710a6 /tensorflow/compiler/xla/tests/test_utils.cc | |
parent | 49115abfd39d30506679d9fdc572ccd2f7c22dbe (diff) |
[XLA] Use absl::make_unique instead of xla::MakeUnique.
Same for WrapUnique.
PiperOrigin-RevId: 209531124
Diffstat (limited to 'tensorflow/compiler/xla/tests/test_utils.cc')
-rw-r--r-- | tensorflow/compiler/xla/tests/test_utils.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/tests/test_utils.cc b/tensorflow/compiler/xla/tests/test_utils.cc index f05421f8e1..2f1d97b25d 100644 --- a/tensorflow/compiler/xla/tests/test_utils.cc +++ b/tensorflow/compiler/xla/tests/test_utils.cc @@ -15,12 +15,13 @@ limitations under the License. #include <cmath> -#include "tensorflow/compiler/xla/tests/test_utils.h" +#include "absl/memory/memory.h" #include "tensorflow/compiler/xla/literal_util.h" #include "tensorflow/compiler/xla/primitive_util.h" #include "tensorflow/compiler/xla/service/hlo_dataflow_analysis.h" #include "tensorflow/compiler/xla/service/hlo_verifier.h" #include "tensorflow/compiler/xla/service/transfer_manager.h" +#include "tensorflow/compiler/xla/tests/test_utils.h" namespace xla { @@ -130,7 +131,7 @@ StatusOr<std::unique_ptr<Literal>> MakeFakeLiteralInternal( if (engine == nullptr) { return Literal::CreateFromShape(shape); } - auto literal = MakeUnique<Literal>(shape); + auto literal = absl::make_unique<Literal>(shape); switch (shape.element_type()) { case BF16: PopulateWithRandomFloatingPointData<bfloat16>(literal.get(), engine, @@ -383,13 +384,15 @@ StatusOr<std::unique_ptr<Literal>> MakeConstrainedArgument( StatusOr<std::unique_ptr<Literal>> MakeFakeLiteral(const Shape& shape, bool pseudo_random) { - auto engine = pseudo_random ? MakeUnique<std::minstd_rand0>() : nullptr; + auto engine = + pseudo_random ? absl::make_unique<std::minstd_rand0>() : nullptr; return MakeFakeLiteralInternal(shape, engine.get(), /*no_duplicates=*/false); } StatusOr<std::vector<std::unique_ptr<Literal>>> MakeFakeArguments( HloModule* const module, bool pseudo_random) { - auto engine = pseudo_random ? MakeUnique<std::minstd_rand0>() : nullptr; + auto engine = + pseudo_random ? absl::make_unique<std::minstd_rand0>() : nullptr; return MakeFakeArguments(module, engine.get()); } |