diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-07-26 18:42:24 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-07-26 18:48:35 -0700 |
commit | fd5de4690d8500f93db12466330cb0da67841062 (patch) | |
tree | e30435778a7c61fd7e5424208b28a070377839a1 /tensorflow | |
parent | 32e198f2d5787ca81aba89bf073e4eb380769253 (diff) |
[XLA] Add regression test for a corner case using Reduce that currently fails with the GPU backend.
PiperOrigin-RevId: 163287986
Diffstat (limited to 'tensorflow')
-rw-r--r-- | tensorflow/compiler/xla/tests/reduce_test.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/tests/reduce_test.cc b/tensorflow/compiler/xla/tests/reduce_test.cc index b22866fc84..2589070188 100644 --- a/tensorflow/compiler/xla/tests/reduce_test.cc +++ b/tensorflow/compiler/xla/tests/reduce_test.cc @@ -795,6 +795,25 @@ INSTANTIATE_TEST_CASE_P( BoundsLayout{{2, 300, 784}, {2, 1, 0}, {1}}, BoundsLayout{{2, 300, 784}, {2, 1, 0}, {0}})); +// TODO(b/64093391) Disabled on GPU due to an assertion failure when running +// IrEmitterUnnested::EmitInitializer() for the Reduce operator. Failed on +// 2017-07-26. +XLA_TEST_F(ReduceTest, DISABLED_ON_GPU(OperationOnConstantAsInitValue)) { + ComputationBuilder builder(client_, TestName()); + Computation max_f32 = CreateScalarMaxComputation(F32, &builder); + + auto a = builder.ConstantR0<float>(2.0f); + auto a2 = builder.Abs(a); + + std::unique_ptr<Literal> b_literal = Literal::CreateR1<float>({1.0f, 4.0f}); + std::unique_ptr<GlobalData> b_data = + client_->TransferToServer(*b_literal).ConsumeValueOrDie(); + auto b = builder.Parameter(0, b_literal->shape(), "b"); + auto max = builder.Reduce(b, a2, max_f32, {0}); + + ComputeAndCompareR0<float>(&builder, 4.0f, {b_data.get()}); +} + } // namespace } // namespace xla |