From 1699d904afa9568db12d4948a330947048b68e96 Mon Sep 17 00:00:00 2001 From: John Lawson Date: Thu, 22 Jun 2017 16:20:32 +0100 Subject: [PATCH] [OpenCL] Fixes CUDA specific test run on SYCL (#56) The testBadParentValuesOnGPU should only be run on CUDA devices, as the test checks for particular CUDA behaviour. We don't actually provide a SYCL kernel for GatherTree and so it's not a problem that the tests don't target SYCL. --- .../seq2seq/python/kernel_tests/beam_search_ops_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tensorflow/contrib/seq2seq/python/kernel_tests/beam_search_ops_test.py b/tensorflow/contrib/seq2seq/python/kernel_tests/beam_search_ops_test.py index 491d87f62d8..3496b355b4b 100644 --- a/tensorflow/contrib/seq2seq/python/kernel_tests/beam_search_ops_test.py +++ b/tensorflow/contrib/seq2seq/python/kernel_tests/beam_search_ops_test.py @@ -65,7 +65,9 @@ class GatherTreeTest(test.TestCase): _ = beams.eval() def testBadParentValuesOnGPU(self): - if not test.is_gpu_available(): + # Only want to run this test on CUDA devices, as gather_tree is not + # registered for SYCL devices. + if not test.is_gpu_available(cuda_only=True): return # (max_time = 4, batch_size = 1, beams = 3) # bad parent in beam 1 time 1; appears as a negative index at time 0