Current pattern partition needs pairs of pattern and check function to do match, one check function correspond to one pattern. Given a target with thousands of patterns, and the target only has one specific requirement for nn.pad, such as pad_value = 0. nn.pad exits in hundred patterns, I want to write only one check function for all patterns, the check function only need to search for nn.pad and check whether pad_value equal to 0.
However, current check function is supposed to check current group root expr, this make it impossible to distinguish whether nn.pad in current group or not. I only care about nn.pad in current group whether meets target requirement.
So I suggest to check new matched function body instead of original group root expr. Deatils refer to https://github.com/apache/tvm/pull/9767.
But many unit tests are failed as some leaf nodes of new function body are new variables instead of original exprs.
Any comments are welcome