Skip to content

Commit

Permalink
Remove type restrictions (google#4009)
Browse files Browse the repository at this point in the history
dynamic_slice and dynamic_update_slice work with S16 types on TPU.
  • Loading branch information
majnemer committed Aug 10, 2020
1 parent d551cec commit eb086f9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/lax_test.py
Expand Up @@ -1753,15 +1753,13 @@ def testReshapeWithUnusualShapes(self):
"Shapes must be 1D sequences of concrete values of integer type.*",
lambda: lax.reshape(np.ones(3,), (1.5, 2.0)))

@jtu.skip_on_devices("tpu") # S16 not supported on TPU
def testDynamicSliceTypeErrors(self):
self.assertRaisesRegex(
TypeError,
"index arguments to dynamic_slice must be integers of the same type",
lambda: lax.dynamic_slice(np.ones((3, 4), dtype=np.float32),
(np.int32(1), np.int16(2)), (2, 2)))

@jtu.skip_on_devices("tpu") # S16 not supported on TPU
def testDynamicUpdateSliceTypeErrors(self):
self.assertRaisesRegex(
TypeError,
Expand Down

0 comments on commit eb086f9

Please sign in to comment.