zhiics commented on a change in pull request #6373:
URL: https://github.com/apache/incubator-tvm/pull/6373#discussion_r513786300



##########
File path: tests/python/relay/test_any.py
##########
@@ -891,6 +891,87 @@ def test_any_ndarray_size():
     verify_any_ndarray_size((2, 2))
     verify_any_ndarray_size((1, 2, 3, 4))
 
+def verify_any_resize(data_shape, scale, layout, static_data_shape, 
ref_out_shape):
+    mod = tvm.IRModule()
+    dtype = "float32"
+    data = relay.var('data', shape=data_shape, dtype=dtype)
+    if layout == "NHWC":
+        size = (data_shape[1] * scale, data_shape[2] * scale)
+    else:
+        size = (data_shape[2] * scale, data_shape[3] * scale)
+    y = relay.image.resize(data, size, layout)
+    mod["main"] = relay.Function([data], y)
+    data_np = np.random.uniform(size=static_data_shape).astype(dtype)
+    for kind in ["debug", "vm"]:

Review comment:
       BTW, this has been moved to `test_result` and you may want to annotate 
the test with `@tvm.testing.uses_gpu` if gpu is supported 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to