[quote="comaniac, post:8, topic:6727"]
I see your point, although I personally think in this case we should either 1) 
specify 4 patterns, or 2) use pattern language to match `fused_conv` , and let 
codegen decide whether it is conv+bias or conv+bias+relu when the codegen is 
parsing a composite function with `fused_conv` attribute.
[/quote]

Note that it is not 4 patterns, but currently we need 2^4 patterns with unique 
names. We also need to order them carefully so that a bigger patterns come 
first. Optional matching is introduced to mitigate this combinatorial mess.

I also realized that "a list of optional names" solution works only for the 
simplest case: if the pattern is tree-ish shaped or contains the same op twice 
and only one of them is optional, it doesn't work.





---
[Visit 
Topic](https://discuss.tvm.ai/t/byoc-use-pattern-language-to-create-composite-functions/6727/12)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/2a02d43ba32b26961a2c56a37f9c75d9200bcf140e01061d10c7277218cd9833).

Reply via email to