You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "Lunderberg (via GitHub)" <gi...@apache.org> on 2024/03/14 21:02:03 UTC

Re: [PR] [RFC] Relax Language Specification [tvm-rfcs]

Lunderberg commented on code in PR #106:
URL: https://github.com/apache/tvm-rfcs/pull/106#discussion_r1525484693


##########
rfcs/assets/0106/spec.md:
##########
@@ -276,12 +276,13 @@ To simplify the writing of Relax passes, we define a normal form for Relax progr
 
 The normal form for Relax is very similar to ANF; differences will be noted. Here are the criteria required for a program to be in normal form:
 1. Within a `SeqExpr`, the right-hand side of any binding (the `value` field in the AST) must either be a "leaf expression" or a non-leaf expression where all subexpressions are leaf expressions. Leaf expressions are the following: Variables (`Var`, `DataflowVar`, or `GlobalVar`), `Constant`, `ShapeExpr`, `PrimValue`, `StringImm`, `DataTypeImm`, or (_unlike_ ANF) `Tuple`. `Tuple` nodes are considered "leaf" expressions even though they contain nesting purely for convenience in writing passes; many operators rely on grouping arguments using tuples, so that is a form of nesting permitted and expected. Otherwise, non-leaf expressions used as subexpressions must be bound to variables; this includes any non-leaf expressions nested inside a `Tuple`.
-2. `SeqExpr`s may appear only in the following locations:
+2. As an addition to the above, all variables of type `TupleStructInfo([])`, the unit tuple, are inlined during normalization. That is, all uses of variables with the type `TupleStructInfo([])` will be replaced directly with the value `Tuple([])` (the unit tuple).

Review Comment:
   Thank you for making the updates here, and this looks accurate to the changes after https://github.com/apache/tvm/pull/16658



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