Run bincount_op_test on GPUs.

Resolves #32755

PiperOrigin-RevId: 272804557
This commit is contained in:
Reed Wanderman-Milne 2019-10-03 21:33:53 -07:00 committed by TensorFlower Gardener
parent 95559baa01
commit 9b5f9aabd8
2 changed files with 3 additions and 2 deletions

View File

@ -167,7 +167,7 @@ cuda_py_test(
],
)
tf_py_test(
cuda_py_test(
name = "bincount_op_test",
size = "small",
srcs = ["bincount_op_test.py"],

View File

@ -21,6 +21,7 @@ import numpy as np
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import errors
from tensorflow.python.framework import ops
from tensorflow.python.framework import test_util
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import gen_math_ops
@ -105,7 +106,7 @@ class BincountTest(test_util.TensorFlowTestCase):
def test_negative(self):
# unsorted_segment_sum will only report InvalidArgumentError on CPU
with self.cached_session():
with self.cached_session(), ops.device("/CPU:0"):
with self.assertRaises(errors.InvalidArgumentError):
self.evaluate(math_ops.bincount([1, 2, 3, -1, 6, 8]))