quic-sanirudh commented on pull request #9422:
URL: https://github.com/apache/tvm/pull/9422#issuecomment-957287696


   Some tests are failing because of the header `from tvm.script import tir as 
T` when being passed into the `tvm.script.from_source()` function.
   
   I see 2 potential ways to fix this and wanted to get suggestions on which 
might be better:
   
   1. First is to add a new boolean argument to the `.script()` function called 
`print_header`, that is set to `True` by default, but passed as `False` when 
they're passed to `from_source` function. This would mean anyone who uses this 
(`from_source()`) function needs to know that the `print_header` should be set 
to `False`.
   2. Second is to modify the `from_source` such that it considers only the 
lines starting from a decorator such as `@T.prim_func` or 
`@tvm.script.ir_module`. (i.e. the first line of the source would be a line 
starting with `@` and everything above would be discarded.
   
   Personally, I think the second option seems preferable to me, but let me 
know what you think. @Hzfengsy @junrushao1994 
   
   Thanks


-- 
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