Hzfengsy commented on pull request #36:
URL: https://github.com/apache/tvm-rfcs/pull/36#issuecomment-928637897


   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to