yangulei commented on PR #13213:
URL: https://github.com/apache/tvm/pull/13213#issuecomment-1293546055

   
https://github.com/apache/tvm/blob/5c9066d816408bd2858c9758b0865ca08112c78f/tests/python/relay/test_pass_partition_graph.py#L1086-L1089
   @masahi The tests above failed because the pattern matcher always matches 
the last two `add`s in `conv-add[bias]-add[bn]-add[sum]`, but the last `add` 
don't have any constant inputs thus cannot be simplified. Do you have any idea 
to fix this?
   
   In this PR, I generalize the `add-add` or `mul-mul` simplification from 
**constant inputs** to **constant expr inputs**, so that complex pattern like 
`mul-add-mul` could be simplified to `mul-add`. In **constant inputs** case, 
the information of constant inputs could be embedded into the pattern for 
matching, thus the last two `add`s in `conv-add[bias]-add[bn]-add[sum]` will 
not match. While in **constant expr inputs** case, I match all `add-add` 
pattern first, then check whether both `add`s have constant inputs.


-- 
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