Don't use guardless contiguity/stride-like implementations (#95733)
These prevent us from simplifying tests involving unbacked SymInts,
and then you end up with unbacked SymInt in guards, which is bad.
Signed-off-by: Edward Z. Yang <[email protected]>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/95733
Approved by: https://github.com/tugsbayasgalan
diff --git a/test/test_proxy_tensor.py b/test/test_proxy_tensor.py
index 88f4aa6..52c53d3 100644
--- a/test/test_proxy_tensor.py
+++ b/test/test_proxy_tensor.py
@@ -899,7 +899,7 @@
def test_item_to_constructor(self):
def f(a):
r = a.item()
- constrain_range(r, min=0)
+ constrain_range(r, min=2)
return torch.empty(r)
r = str(make_fx(f, tracing_mode="symbolic")(torch.randint(5, (1,))).code).strip()
@@ -971,7 +971,6 @@
return None""")
@unittest.skipIf(not USE_TORCHVISION, "test requires torchvision")
- @unittest.expectedFailure
def test_unbacked_batch_resnet(self):
mod = torchvision.models.resnet18()