[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.
This commit is contained in:
John Lawson 2017-06-22 16:20:32 +01:00 committed by Luke Iwanski
parent af0cbace1d
commit 1699d904af

View File

@ -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