[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-24 Thread tqchen via Apache TVM Discuss
To move forward, how about we go with option 2b for now. --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/14) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apac

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-21 Thread Tristan Konolige via Apache TVM Discuss
Yes and no. Right now we do not need to differentiate. But in the future, functions in a module may either use be for TIR or for relay. --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/13) to respond. You are receiving this because you enabled mailing list

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-21 Thread Bohan Hou via Apache TVM Discuss
No matter which option we take, do we have to discriminate between function and class when annotating with decorator? --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/12) to respond. You are receiving this because you enabled mailing list mode. To unsubsc

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-21 Thread Tristan Konolige via Apache TVM Discuss
I've put up an initial PR here: https://github.com/apache/incubator-tvm/pull/6522. An issue has come up, what do we name the python module? ## Option 1 We name the module `tvm.tvmscript`. Example usage: ```python import tvm # Can still use this though @tvm.script # or tvm.script.tir def my_fu

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-17 Thread tqchen via Apache TVM Discuss
There are some tradeoffs, for example, given the type system is shared across relay and tir. We might in the future have things like ```python @tvm.script class MixedModule: MyStruct = ADT[Integer, Integer] def relay_func(x: ty.Tensor): return relay.call_tir_dest_passing(t

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-17 Thread Tristan Konolige via Apache TVM Discuss
How about this for mixed TIR and Relay: class MixedModule: @relay.script def relay_func(x: ty.Tensor): return relay.call_tir_dest_passing(tir_func, x) @tir.script def tir_func(x: ty.handle) ... --- [Visit Topic](https:/

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-17 Thread tqchen via Apache TVM Discuss
One thing that is worth considering is how are we going to parse a module with mixed relay and tir functions (or those with external ones). ``` @tvm.script class MixedModule: def relay_func(x: ty.Tensor): return relay.call_tir_dest_passing(tir_func, x) def tir_func(x: ty.

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-17 Thread Jared Roesch via Apache TVM Discuss
I don't think having a single decorator makes sense given that the two scripts will require disambiguation with separate decorators. My recent syntactic rewriting work on Relay shares very little concrete syntax with TIR. Either way we will probably need `tvm.script.tir` and `tvm.script.relay`

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-17 Thread Siyuan Feng via Apache TVM Discuss
`tvm.script` would be a great name --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/6) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-15 Thread Bohan Hou via Apache TVM Discuss
`tvm.script` looks good to me. --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/5) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/542

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-15 Thread tqchen via Apache TVM Discuss
I like the idea of `tvm.script` as the intention is to have the script to be able to represent both relay and tir module collectively. --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/4) to respond. You are receiving this because you enabled mailing list mo

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-15 Thread Jason Knight via Apache TVM Discuss
:heart_eyes: :star_struck: Thank you for proposing this! Completely agreed that we should disambiguate. Having `tvm.script` and `te.hybrid.script` is an improvement, but I still think there is far more overlap than ideal between the two. What about `pytir`? Then it opens the door to other emb

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-15 Thread Junru Shao via Apache TVM Discuss
CC: @spectrometerHBH @Hzfengsy @were --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-rename-hybrid-script/7915/2) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscri

[Apache TVM Discuss] [Development/RFC] [RFC] Rename Hybrid Script

2020-09-15 Thread Tristan Konolige via Apache TVM Discuss
## Current issue TVM current has two different hybrid scripts: `te.hybrid.script` and `tvm.hybrid.script`. This leads to confusion as both scripts are similar but share different use cases and properties. This is especially confusing for new users as hybrid script can refer to either of these