Enable bitwise shift operations tests (#97150)

With #70904 fixed, we can remove the skips for the bitwise shift tests.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97150
Approved by: https://github.com/Skylion007, https://github.com/kit1980
This commit is contained in:
BJ Hargrave
2023-07-06 15:32:57 +00:00
committed by PyTorch MergeBot
parent 17ab4f85e9
commit def7b3ed60
2 changed files with 11 additions and 2 deletions

View File

@ -3134,10 +3134,10 @@ class TestBinaryUfuncs(TestCase):
self.assertEqual(a >> 1, expected_r)
self.compare_with_numpy(lambda x: x >> 1, lambda x: np.right_shift(x, 1), a)
@onlyCPU
@onlyNativeDeviceTypes
@dtypes(*get_all_int_dtypes())
def test_shift_limits(self, device, dtype):
"Ensure that CPU integer bit shifting works as expected with out-of-limits shift values."
"Ensure that integer bit shifting works as expected with out-of-limits shift values."
# Issue #70904
iinfo = torch.iinfo(dtype)
bits = iinfo.bits