mbrookhart commented on pull request #9767:
URL: https://github.com/apache/tvm/pull/9767#issuecomment-1032931537


   Ah, I think I understand now. I see a couple of options. 
   
   The simplest might be to run this pass on the graph before doing pattern 
matching, that should remove most of the pads, but it would also require 
removing the pads from your patterns.
   
https://github.com/apache/tvm/blob/824772489e514faf06025d7c09ce4dc13dcd7d08/python/tvm/relay/transform/transform.py#L1214-L1224
   
   The next best option might be to align the rewrite callback and check APIs. 
For Rewrite, we have the callback take the pre-rewrite grap, the post-rewrite 
graph, and the map of pattern->node matches:
   
   
https://github.com/apache/tvm/blob/824772489e514faf06025d7c09ce4dc13dcd7d08/src/relay/ir/dataflow_matcher.cc#L821
   
   If we adjusted the `check` API to take the same arguments, that might solve 
the problem. Again, it would require adjusting definitions in other parts of 
the codebase.


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