zhiics commented on a change in pull request #6422: URL: https://github.com/apache/incubator-tvm/pull/6422#discussion_r485221856
########## File path: tests/python/relay/test_any.py ########## @@ -801,6 +801,27 @@ def test_any_ndarray_size(): verify_any_ndarray_size((2, 2)) verify_any_ndarray_size((1, 2, 3, 4)) +def test_any_consecutive_broadcast(): + data0 = relay.var("data0", shape=any_dims(2), dtype='float32') + data1 = relay.var("data1", shape=any_dims(2), dtype='float32') + data2 = relay.var("data2", shape=any_dims(2), dtype='float32') + data3 = relay.var("data3", shape=any_dims(2), dtype='float32') + + out0 = data0 + data1 + out1 = data0 * data1 + out2 = out0 - out1 + + out3 = data2 + data3 + out4 = data2 * data3 + out5 = out3 - out4 + + out6 = out2 * out5 + + mod = tvm.IRModule() + mod['main'] = relay.Function([data0, data1, data2, data3], out6) + + relay.create_executor("vm", mod=mod, ctx=tvm.cpu(), target="llvm") Review comment: let's use `check_results` and feed it with data so that we can run it on both gpu and cpu ---------------------------------------------------------------- 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