Thanks, @altanh. Your suggestion makes sense to me. To be specific, here are two cases: parse from a python script and string. 1. When we parse from a python script, we detect the prefix `T` from the python env (through function `__globals__`, i.e. you can even use `XXX.block` if with `from tvm.script import tir as XXX`) 2. When we parse from a text string (e.g. printed from tir), we can specify the accept prefixes by `from_source(source_code, tir_prefix=["T", "tir"])` (default accept both `tir` and `T`). Also, we can choose the prefix during printing by `func.script(tir_prefix=“tir”)` (default `tir`)
I would update the PR with the new proposal soon. Please feel free to left your comments about the changes. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/36#issuecomment-928637897