[Apache TVM Discuss] [Development/pre-RFC] [RFC] Better type hinting for TVM scripts

2021-08-01 Thread Zihao Ye via Apache TVM Discuss
Current TVM's scripting mode (TIR's hybrid script/TVM's hybrid script) uses sub-language embedded in python frontend, user cannot use type hinting and auto completion tools because the code is not parsed by python. We can create a `.pyi` stub for these keywords which only annotates type and l

[Apache TVM Discuss] [Development/pre-RFC] [RFC] Better type hinting for TVM scripts

2021-08-01 Thread Junru Shao via Apache TVM Discuss
Thanks for the proposal! It is definitely extremely important for us to have better type hints and documents for TVM scripts. One quick question I have been thinking of: is it possible to unify and prevent divergence between `tir.XXX` in the script and `tvm.tir` namespace? If so, there probab

[Apache TVM Discuss] [Development/pre-RFC] [RFC] Setting up Mypy type checking for TVM codebase

2021-08-01 Thread Junru Shao via Apache TVM Discuss
@Wheest I am not super certain if there is a fully automated process given our current docstring-based type annotation may be casual or inaccurate, but it is definitely doable if we could call for community contribution :-) --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-setting-up