mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
PyTorch MergeBot
parent
17ab4f85e9
commit
def7b3ed60
@ -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
|
||||
|
Reference in New Issue
Block a user