Use maxint to bound integers. (#96121) We don't actually support arbitrary precision integers. Signed-off-by: Edward Z. Yang <[email protected]> Pull Request resolved: https://github.com/pytorch/pytorch/pull/96121 Approved by: https://github.com/tugsbayasgalan, https://github.com/lezcano
diff --git a/test/test_proxy_tensor.py b/test/test_proxy_tensor.py index d1f5de6..d8f2d6f 100644 --- a/test/test_proxy_tensor.py +++ b/test/test_proxy_tensor.py
@@ -970,6 +970,16 @@ index_put_ = torch.ops.aten.index_put_.default(crop_camera_1, [mask_1], view_2); crop_camera_1 = mask_1 = view_2 = None return None""") + def test_unbacked_slice(self): + def f(x, m): + x = x[m] + return x[slice(None, None, None), slice(None, None, None), slice(None, 2, None)] + + make_fx(f, tracing_mode="symbolic")( + torch.randn((12, 3, 3)), + torch.randint(0, 2, (12,), dtype=torch.bool) + ) + @unittest.skipIf(not USE_TORCHVISION, "test requires torchvision") def test_unbacked_batch_resnet(self): mod = torchvision.models.resnet18()