Enable MLIR bridge for compiler tests requiring unsigned integers
PiperOrigin-RevId: 310060768 Change-Id: I88c00c92d35f606fd803291e7b5d68fb701faff7
This commit is contained in:
parent
4a99cae68e
commit
cfec8b840c
tensorflow/compiler/tests
@ -299,7 +299,6 @@ class BinaryOpsTest(xla_test.XLATestCase):
|
||||
]
|
||||
self._testBinary(bitwise_ops.right_shift, lhs, rhs, expected=expected)
|
||||
|
||||
@test_util.disable_mlir_bridge("TODO(b/153896312): Handle unsigned ints")
|
||||
def testAdd(self):
|
||||
for dtype in self.numeric_types:
|
||||
self._testBinary(
|
||||
@ -326,7 +325,6 @@ class BinaryOpsTest(xla_test.XLATestCase):
|
||||
expected=np.array([3.0269620882574744, 3.3149631512242195],
|
||||
dtype=dtype))
|
||||
|
||||
@test_util.disable_mlir_bridge("TODO(b/153896312): Handle unsigned ints")
|
||||
def testMultiply(self):
|
||||
for dtype in self.numeric_types:
|
||||
self._testBinary(
|
||||
@ -390,7 +388,6 @@ class BinaryOpsTest(xla_test.XLATestCase):
|
||||
expected=np.array([[16], [81]], dtype=dtype),
|
||||
rtol=rtol)
|
||||
|
||||
@test_util.disable_mlir_bridge("TODO(b/153896312): Handle unsigned ints")
|
||||
def testNumericOps(self):
|
||||
for dtype in self.numeric_types:
|
||||
self._testBinary(
|
||||
@ -934,7 +931,6 @@ class BinaryOpsTest(xla_test.XLATestCase):
|
||||
expected = np.array([op(l, r) for l, r in zip(lhs, rhs)], dtype=np.bool)
|
||||
self._testBinary(op, lhs, rhs, expected=expected)
|
||||
|
||||
@test_util.disable_mlir_bridge("TODO(b/153896312): Handle unsigned ints")
|
||||
def testBroadcasting(self):
|
||||
"""Tests broadcasting behavior of an operator."""
|
||||
|
||||
|
@ -38,7 +38,6 @@ class GatherNdTest(xla_test.XLATestCase):
|
||||
feed_dict = {paramsp: params, indicesp: indices}
|
||||
return gather_nd_t.eval(feed_dict=feed_dict)
|
||||
|
||||
@test_util.disable_mlir_bridge("TODO(b/153896312): Handle unsigned ints")
|
||||
def testSimpleDtype(self):
|
||||
for dtype in self.numeric_types:
|
||||
self.assertAllEqual(
|
||||
|
@ -757,7 +757,6 @@ class UnaryOpsTest(xla_test.XLATestCase):
|
||||
np.array([1 + 3j, -4 + 7j, 2.7, -3j], dtype=dtype),
|
||||
expected=np.array([1, -4, 2.7, 0], dtype=ctypes[dtype]))
|
||||
|
||||
@test_util.disable_mlir_bridge("TODO(b/153896312): Handle unsigned ints")
|
||||
def testIntOps(self):
|
||||
for dtype in self.int_types:
|
||||
self._assertOpOutputMatchesExpected(
|
||||
|
@ -81,7 +81,7 @@ class XlaOpsNumericalTest(xla_test.XLATestCase, parameterized.TestCase):
|
||||
args=(v,),
|
||||
expected=np.tile(v, (7, 42, 1, 1)))
|
||||
|
||||
@test_util.disable_mlir_bridge('Unsigned ints are not supported yet')
|
||||
@test_util.disable_mlir_bridge('Dynamic result types not supported')
|
||||
def testShiftRightLogical(self):
|
||||
self._assertOpOutputMatchesExpected(
|
||||
xla.shift_right_logical,
|
||||
@ -93,7 +93,7 @@ class XlaOpsNumericalTest(xla_test.XLATestCase, parameterized.TestCase):
|
||||
args=(np.array([0xFFFFFFFF, 16], dtype=np.uint32), np.uint32(4)),
|
||||
expected=np.array([0x0FFFFFFF, 1], dtype=np.uint32))
|
||||
|
||||
@test_util.disable_mlir_bridge('Unsigned ints are not supported yet')
|
||||
@test_util.disable_mlir_bridge('Dynamic result types not supported')
|
||||
def testShiftRightArithmetic(self):
|
||||
self._assertOpOutputMatchesExpected(
|
||||
xla.shift_right_arithmetic,
|
||||
|
Loading…
Reference in New Issue
Block a user