diff options
author | Bixia Zheng <bixia@google.com> | 2018-10-03 16:34:05 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-03 16:39:07 -0700 |
commit | 207bea0e35ab635e66137520963761a6e94354ea (patch) | |
tree | 62532c0bbadd2cbe4add539ec26f2f27e58858c1 /tensorflow/compiler | |
parent | 041c347df995e6c6d9206920ae061f558e120b92 (diff) |
[XLA] Revise the way to express a CPU specific test.
Use #ifdef XLA_TEST_BACKEND_CPU to protect the test instead of disabling it for
all the other backends except for the CPU backend.
PiperOrigin-RevId: 215651036
Diffstat (limited to 'tensorflow/compiler')
-rw-r--r-- | tensorflow/compiler/xla/tests/fusion_test.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tensorflow/compiler/xla/tests/fusion_test.cc b/tensorflow/compiler/xla/tests/fusion_test.cc index fd79a9d041..4d4b676a53 100644 --- a/tensorflow/compiler/xla/tests/fusion_test.cc +++ b/tensorflow/compiler/xla/tests/fusion_test.cc @@ -764,9 +764,10 @@ XLA_TEST_F(FusionTest, Clamp2D) { TestElementwise2D<float, 3>(HloOpcode::kClamp); } -// TODO(b/117156505): Remove this test when the bug is fixed. -XLA_TEST_F(FusionTest, DISABLED_ON_GPU(DISABLED_ON_INTERPRETER( - LayoutChangingElementWiseOp))) { +// TODO(b/117156505): Remove this test when the bug is fixed and the CPU backend +// should not generate layout changing elementwise operations. +#ifdef XLA_TEST_BACKEND_CPU +XLA_TEST_F(FusionTest, LayoutChangingElementWiseOp) { const string hlo_text = R"( HloModule Cluster @@ -795,6 +796,7 @@ ENTRY main { LiteralUtil::CreateR3<float>({{{0.}, {0.76159415595}}, {{0.}, {0.}}}), result)); } +#endif class FusionClientLibraryTest : public ClientLibraryTestBase {}; |