comaniac commented on a change in pull request #7375:
URL: https://github.com/apache/tvm/pull/7375#discussion_r567183570
##########
File path: tests/python/relay/test_op_level2.py
##########
@@ -1171,35 +1171,64 @@ def test_flatten_infer_type():
@tvm.testing.uses_gpu
def test_pad_infer_type():
- # entirely concrete case
+ # entirely concrete cases
n, c, h, w = 1, 2, 3, 4
t = relay.var("t", relay.TensorType((n, c, h, w), "float32"))
y = relay.nn.pad(t, ((1, 1), (2, 2), (3, 3), (4, 4)))
"pad_width=" in y.astext()
yy = run_infer_type(y)
assert yy.checked_type == relay.TensorType((3, 6, 9, 12), "float32")
+ n, c, h, w = 4, 6, 3, 5
+ t = relay.var("t", relay.TensorType((n, c, h, w), "float32"))
+ y = relay.nn.pad(t, ((-1, -1), (2, -2), (0, -3), (4, 4)),
pad_mode="reflect")
+ "pad_width=" in y.astext()
Review comment:
Is that what you meant?
```suggestion
assert "pad_width=" in y.astext()
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]