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

2020-05-28 Thread GitBox
mbrookhart commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635675067 @comaniac The input VarPattern name is already optional, if you use is_input() it will match any VarNode https://github.com/apache/incubator-tvm/blob/a072da0588c5427

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

2020-05-28 Thread GitBox
mbrookhart commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635674194 I'd liked to refine slightly: - Pattern input ExprPattern(relay.const): - Only match constant nodes that match the value and embed them in the partitioned func

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

2020-05-28 Thread GitBox
mbrookhart commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635668518 I think it depends on which one matched? If it's a var, we lift it, if it's a constant, we embed?

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

2020-05-28 Thread GitBox
mbrookhart commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635666562 I think I agree with @mbaret here. I think I see a simple way to do that behavior by default, why don't I post another PR in that direction after this goes in? --

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

2020-05-28 Thread GitBox
mbrookhart commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635646234 :point_up: I'll let you guys discuss the appropriate behavior, there's seems to be some complication to this. In the mean time, this was my initial assumption:

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

2020-05-28 Thread GitBox
mbrookhart commented on pull request #5689: URL: https://github.com/apache/incubator-tvm/pull/5689#issuecomment-635637682 @mbaret Originally the pass embedded constants in the function body, but @comaniac filed #5662, and I responded with #5663, so it currently will lift the constants to t