quic-sanirudh commented on pull request #9422: URL: https://github.com/apache/tvm/pull/9422#issuecomment-961784275
> > I think we can skip printing the import prefix, and let parser detect T (and tir) as namespace by default > > Yes, that makes sense, thanks @tqchen. I'll make those changes and update the PR. I see that the parser [already supports](https://github.com/apache/tvm/blob/e24c0754a537ff05154624a1e8e23608651c0a4e/python/tvm/script/parser.py#L1091) both `tir` and `T` as the namespace, when the `prim_func` source is passed as string. If the function is directly passed to the `tvm.script.parser.from_source()`, then the namespace is [automatically identified](https://github.com/apache/tvm/blob/e24c0754a537ff05154624a1e8e23608651c0a4e/python/tvm/script/parser.py#L1096). So, I think either way, the parser can already handle using `T` as the namespace. For python, however, finding the `T` symbol in its symbol table requires that we import `T`, so instead of printing the import prefix and handling the cases, shall we just print a comment as a header mentioning import prefix to be used? -- 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]
