shingjan commented on code in PR #13433:
URL: https://github.com/apache/tvm/pull/13433#discussion_r1026879009


##########
src/printer/tvmscript_printer.cc:
##########
@@ -1259,10 +1259,22 @@ Doc TVMScriptPrinter::VisitStmt_(const IfThenElseNode* 
op) {
   Doc doc;
   doc << "if " << Print(op->condition) << ":";
   doc << Doc::Indent(4, Doc::NewLine() << PrintBody(op->then_case));
-  if (!is_one(op->condition) && op->else_case) {
-    doc << Doc::NewLine();
-    doc << "else:" << Doc::Indent(4, Doc::NewLine() << 
PrintBody(op->else_case.value()));
+
+  Optional<Stmt> else_case = op->else_case;

Review Comment:
   would that be possible that we can add a comment here or a code snippet in 
the PR to show the elif print before and after this change. Otherwise LGTM. 



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