quic-sanirudh commented on pull request #9315: URL: https://github.com/apache/tvm/pull/9315#issuecomment-949759035
From my limited experience playing with TensorIR recently, I realized that almost all tests in TVM import the tir script as `from tvm.script import tir as T` and the same is used in the examples here. But, when we print out the prim_func using `print(func.script())` and try to manually modify parts of it and copy it back into our code, the printed prim_func always uses `tir.prim_func`, `tir.block()`, etc. In other words, it does not alias the `tir` module to `T`. If I understand correctly, one of the original design goals of TVM script is to support this sort of round trip, so would it make sense to try and make the syntax consistent between our examples in the documentation and the actual script being printed so that it's easy to copy paste without having to find and replace all instances of `tir` to `T`. I know the programmer can always choose to not alias `tir` module to `T`, but if it's used like that in the documentation, users are going to try and stick to that format. Just a small thing I wanted to bring up, let me know your thoughts. -- 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]
