[XLA] Fix select and scatter tests.

- Use std::vector instead of absl::span
- Reduce the size of one large test (192s -> 35s)
- Reenable the test in OSS.

PiperOrigin-RevId: 301743200
Change-Id: I2788859a9210a43e4fcd65478701ed7df420d181
This commit is contained in:
Yunxing Dai 2020-03-18 22:49:31 -07:00 committed by TensorFlower Gardener
parent 732bce892c
commit 7b2850ee7d
2 changed files with 5 additions and 7 deletions

View File

@ -1497,8 +1497,6 @@ xla_test(
timeout = "long",
srcs = ["select_and_scatter_test.cc"],
tags = [
"manual", # TODO(b/151876386)
"no_oss",
"no_rocm",
"optonly",
],

View File

@ -42,8 +42,8 @@ struct SelectAndScatterTestParam {
std::vector<int64> operand_shape;
std::vector<int64> source_shape;
Padding padding_type;
absl::Span<const int64> window_dimensions;
absl::Span<const int64> window_strides;
std::vector<int64> window_dimensions;
std::vector<int64> window_strides;
};
class SelectAndScatterTest
@ -186,11 +186,11 @@ INSTANTIATE_TEST_CASE_P(
Padding::kValid,
{2, 1, 1},
{3, 1, 1}},
SelectAndScatterTestParam{{160, 160, 8, 256},
SelectAndScatterTestParam{{10, 10, 8, 256},
{5, 5, 8, 256},
Padding::kSame,
{32, 32, 1, 1},
{32, 32, 1, 1}},
{2, 2, 1, 1},
{2, 2, 1, 1}},
SelectAndScatterTestParam{
{9, 16, 128}, {3, 16, 128}, Padding::kValid, {3, 1, 1}, {3, 1, 1}},
SelectAndScatterTestParam{