guan404ming commented on code in PR #18429:
URL: https://github.com/apache/tvm/pull/18429#discussion_r2514952876


##########
tests/python/relax/test_frontend_from_exported_program.py:
##########
@@ -6663,5 +6527,29 @@ def forward(self, x):
     np.testing.assert_allclose(pytorch_output2.numpy(), tvm_output2_np, 
rtol=1e-4, atol=1e-5)
 
 
+def test_dynamic_shape_with_range_constraints():
+    class DynamicModel(torch.nn.Module):
+        def forward(self, x1, x2):
+            return torch.ops.aten.add.Tensor(x1, x2)
+
+    example_args = (torch.randn(8, 4), torch.randn(8, 4))
+    batch = torch.export.Dim("batch", min=1, max=64)
+    dynamic_shapes = {"x1": {0: batch}, "x2": {0: batch}}
+    exported_program = export(DynamicModel(), args=example_args, 
dynamic_shapes=dynamic_shapes)
+
+    mod = from_exported_program(exported_program)

Review Comment:
   Should we also need to update tests in 
https://github.com/apache/tvm/blob/f574031657faa035ffd1875050316b11821187cf/tests/python/relax/test_frontend_from_exported_program.py?
   
   I could help with this if needed.
   
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to