aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/tests/fusion_test.cc
diff options
context:
space:
mode:
authorGravatar Tim Shen <timshen@google.com>2018-08-30 16:03:10 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-30 16:07:27 -0700
commit6f879f891abe2e267c5cf512d034d7c3641cfdb0 (patch)
tree33dfda2aa13bdec06d3aa330dd5816441d449fa7 /tensorflow/compiler/xla/tests/fusion_test.cc
parent5d5591fbd4624ff7e50f305464667315f2d41ebb (diff)
[XLA] Rename all (Mutable)ArraySlice to absl::Span.
PiperOrigin-RevId: 210998142
Diffstat (limited to 'tensorflow/compiler/xla/tests/fusion_test.cc')
-rw-r--r--tensorflow/compiler/xla/tests/fusion_test.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/tests/fusion_test.cc b/tensorflow/compiler/xla/tests/fusion_test.cc
index 15a9d55bfe..cbfe147953 100644
--- a/tensorflow/compiler/xla/tests/fusion_test.cc
+++ b/tensorflow/compiler/xla/tests/fusion_test.cc
@@ -48,7 +48,6 @@ limitations under the License.
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/platform/types.h"
-using tensorflow::gtl::ArraySlice;
namespace xla {
namespace {
@@ -113,7 +112,7 @@ class FusionTest : public HloTestBase {
hlos[0] = builder.AddInstruction(std::move(root_hlo));
hlo_module->AddEntryComputation(builder.Build())
->CreateFusionInstruction(
- ArraySlice<HloInstruction*>(hlos).subspan(0, Arity + 1),
+ absl::Span<HloInstruction* const>(hlos).subspan(0, Arity + 1),
HloInstruction::FusionKind::kLoop);
auto expected = LiteralUtil::CreateR2FromArray2D(answer_data);
@@ -127,12 +126,12 @@ class FusionTest : public HloTestBase {
private:
template <typename T>
- T ComputeElementwiseAnswer(HloOpcode opcode, ArraySlice<float> xs);
+ T ComputeElementwiseAnswer(HloOpcode opcode, absl::Span<const float> xs);
};
template <>
float FusionTest::ComputeElementwiseAnswer<float>(HloOpcode opcode,
- ArraySlice<float> xs) {
+ absl::Span<const float> xs) {
switch (opcode) {
case HloOpcode::kAdd:
return xs[0] + xs[1];
@@ -157,7 +156,7 @@ float FusionTest::ComputeElementwiseAnswer<float>(HloOpcode opcode,
template <>
bool FusionTest::ComputeElementwiseAnswer<bool>(HloOpcode opcode,
- ArraySlice<float> xs) {
+ absl::Span<const float> xs) {
switch (opcode) {
case HloOpcode::kEq:
return xs[0] == xs[1];