You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/11/02 06:19:37 UTC

[GitHub] [tvm] Hzfengsy commented on a change in pull request #9422: [TensorIR] Print TVMScript with prefix T instead of tir

Hzfengsy commented on a change in pull request #9422:
URL: https://github.com/apache/tvm/pull/9422#discussion_r740746576



##########
File path: src/printer/tvmscript_printer.cc
##########
@@ -310,6 +310,13 @@ class TVMScriptPrinter : public StmtFunctor<Doc(const Stmt&)>,
     }
     return doc;
   }
+
+ public:
+  static Doc PrintHeader(const std::string& tir_prefix) {
+    Doc header;
+    header << "from tvm.script import tir as " << tir_prefix << Doc::NewLine();

Review comment:
       ```suggestion
       if (tir_prefix != "tir") {
         header << "from tvm.script import tir as " << tir_prefix << Doc::NewLine();
       } else {
         header << "from tvm.script import tir" << Doc::NewLine();
       }
   ```




-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org