aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tayo Oguntebi <tayo@google.com>2018-01-18 14:01:07 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-18 14:05:03 -0800
commite9924c06b9c911afa556ef18e0cc7232d2b932e5 (patch)
tree7d33858ad6c8501cd2349c34e6ac17898e33fcbc
parentbd4445f41e7e3cca18c5959b0301cd60379f31d4 (diff)
Adds ReduceWindow R1 test case for windows of length 128.
PiperOrigin-RevId: 182433727
-rw-r--r--tensorflow/compiler/xla/tests/reduce_window_test.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/tests/reduce_window_test.cc b/tensorflow/compiler/xla/tests/reduce_window_test.cc
index 17d01dced2..01f23efcd5 100644
--- a/tensorflow/compiler/xla/tests/reduce_window_test.cc
+++ b/tensorflow/compiler/xla/tests/reduce_window_test.cc
@@ -473,6 +473,23 @@ XLA_TEST_P(ReduceWindowTest, Add128In128Stride128) {
DefaultErrorSpec());
}
+XLA_TEST_P(ReduceWindowTest, Add128In128) {
+ std::vector<float> input_vector{
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
+ const auto input = CreateConstantFromLiteral(
+ *Literal::CreateR1<float>(input_vector), &builder_);
+ ReduceWindowAdd(input, {128}, {1}, Padding::kValid);
+ ComputeAndCompareLiteral(&builder_, *Literal::CreateR1<float>({1088}), {},
+ DefaultErrorSpec());
+}
+
// Regression test for a bug that appeared in Inception (b/34784899).
TEST_P(ReduceWindowTest, R2ReduceWindowInceptionFromBroadcast) {
Array2D<float> input_array(14, 14, 1.0f);