You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current TIR script is a 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 leave the implementations empty (actually we don't need them). The stub could also help us generate language reference for user to grasp the syntax and semantics of TIR scripts.
For example, if I write a __init__.pyi under tvm.tir (from simplicity, it only cover a few keywords):
it could help type hinting and auto completion when user write their TIR scripts.
However, there might be some conflict between python functions under tvm.tir and tir script keywords. @junrushao1994 's suggestion in to create another namespace (e.g. tvm.tir.T), I wonder do you have any elegant proposal for this?
The text was updated successfully, but these errors were encountered:
Current TIR script is a 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 leave the implementations empty (actually we don't need them). The stub could also help us generate language reference for user to grasp the syntax and semantics of TIR scripts.For example, if I write a
__init__.pyi
undertvm.tir
(from simplicity, it only cover a few keywords):it could help type hinting and auto completion when user write their TIR scripts.
However, there might be some conflict between python functions under
tvm.tir
and tir script keywords. @junrushao1994 's suggestion in to create another namespace (e.g. tvm.tir.T), I wonder do you have any elegant proposal for this?The text was updated successfully, but these errors were encountered: