mbrookhart commented on a change in pull request #5656: URL: https://github.com/apache/incubator-tvm/pull/5656#discussion_r429476254
########## File path: tests/python/relay/test_pass_merge_composite.py ########## @@ -64,55 +65,53 @@ def make_add_sub_mul_pattern(): - """Create a pattern to match the following graph. + r"""Create a pattern to match the following graph. add sub \ / \ / mul """ - x = relay.var('x') - y = relay.var('y') - add_node = relay.add(x, y) - sub_node = relay.subtract(x, y) - mul_node = relay.multiply(add_node, sub_node) + x = wildcard() + y = wildcard() + add_node = is_op('add')(x, y) + sub_node = is_op('subtract')(x, y) + mul_node = is_op('multiply')(add_node, sub_node) Review comment: Just FYI, if you think it would be easier, the DFPattern objects on the python side have syntatic sugar for +, -, *, / , | ---------------------------------------------------------------- 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