[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635675585 > @comaniac @mbrookhart good to go? Yeah I'm fine with that. This is an automated message from the

[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635672040 OK so here is a conclusion for another follow-up PR to deal with constant lifting. - Pattern input `ConstantPattern`: - Only match constant nodes and keep th

[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635667979 That's the behavior I just realized with above examples. In this case, what would be the behavior if we specify `VarPattern('x') | ConstantPattern()`? --

[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635663626 OK I can finally reproduce this case: ``` fn (%x: Tensor[(1, 3, 224, 224), float32], %b: Tensor[(3), float32]) -> Tensor[(1, 3, 222, 222), float32] { %1 = f

[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635649921 I made an example and tested it with old `MergeComposite` pass (master commit 6100112a150540588ddc9abb36dea0ff961f4301). It behaves as I expected. The partitioned composi

[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635637903 > Thanks for the PR so soon! Is there an example of how partition works on a constant match? In particular, does the constant remain propagated into the body? An e

[GitHub] [incubator-tvm] comaniac commented on pull request #5689: [PatternLang] Add ConstantPattern

2020-05-28 Thread GitBox
comaniac commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635629161 > To make other syntactic sugar, you could add an is_const() that simiply creats a new ConstPattern, but I don't think it's strictly necessary. I could do that. How