[TVM Discuss] [Questions] Pattern matching for TupleGetItem

2020-06-23 Thread Matthew Brookhart via TVM Discuss
@t-vi Sure, if you want to extend it, I'm okay with that. I'm not sure we need an extra API, maybe just make the arbitrary value default? --- [Visit Topic](https://discuss.tvm.ai/t/pattern-matching-for-tuplegetitem/7069/3) to respond. You are receiving this because you enabled mailing li

[TVM Discuss] [Questions] Same shape pattern

2020-06-18 Thread Matthew Brookhart via TVM Discuss
@t-vi Sorry for my delay, I had a lot of meetings today. I've finally read through this enough to grok the problem. I'm not sure the Pattern Language is the right tool for this pass. As you said here: [quote="t-vi, post:3, topic:7012"] I’m always wondering whether I’m missing ready-made pass

[TVM Discuss] [Questions] Same shape pattern

2020-06-18 Thread Matthew Brookhart via TVM Discuss
Ah, yeah, this makes sense now. The first LikeZapp pass will return this in certain cases: ``` tvm.relay.broadcast_to(data, list(res._checked_type_.shape)) ``` Which doesn't have a type when it is constructed, but ZeroZapp later can find that node and assume it does have a type. Thus, the prob

[TVM Discuss] [Questions] Same shape pattern

2020-06-18 Thread Matthew Brookhart via TVM Discuss
@matt-arm Can you give me an example? Is this just the partition issue we talked about before, or something else? --- [Visit Topic](https://discuss.tvm.ai/t/same-shape-pattern/7012/9) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these email

[TVM Discuss] [Questions] [PattenLang]How to match op according to element type of input and output

2020-06-09 Thread Matthew Brookhart via TVM Discuss
https://github.com/apache/incubator-tvm/pull/5760 --- [Visit Topic](https://discuss.tvm.ai/t/pattenlang-how-to-match-op-according-to-element-type-of-input-and-output/6846/15) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [clic

[TVM Discuss] [Questions] [PattenLang]How to match op according to element type of input and output

2020-06-09 Thread Matthew Brookhart via TVM Discuss
I'll throw together a PR with those extensions. Thanks! --- [Visit Topic](https://discuss.tvm.ai/t/pattenlang-how-to-match-op-according-to-element-type-of-input-and-output/6846/14) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails,

[TVM Discuss] [Questions] [PattenLang]How to match op according to element type of input and output

2020-06-08 Thread Matthew Brookhart via TVM Discuss
What do you guys thing? Which would be easier to use? --- [Visit Topic](https://discuss.tvm.ai/t/pattenlang-how-to-match-op-according-to-element-type-of-input-and-output/6846/11) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [

[TVM Discuss] [Questions] [PattenLang]How to match op according to element type of input and output

2020-06-08 Thread Matthew Brookhart via TVM Discuss
Yeah, it's a bit complicated. The current pattern uses the tvm::ir::Type* classes, so you can match number of versions of types, but as this question reveals, we may want a finer granularity on some types. Unfortunately, since we're using a lower level Type object, we won't be able to embed

[TVM Discuss] [Questions] [PattenLang]How to match op according to element type of input and output

2020-06-08 Thread Matthew Brookhart via TVM Discuss
My apologies! I somehow missed this last week. Yeah, the current TypePattern is matching the full type via StructuralEqual. One possibility to clean this up slightly is to add a rule of: 1) If it's a TensorType 2) and the pattern's shape is () 3) only check the dtype That would only take a han