junrushao opened a new pull request, #13358:
URL: https://github.com/apache/tvm/pull/13358

   As part of effort of more formal TIR semantics, we want to more explicitly 
differentiate TIR AST nodes (defined in `tir/expr.h`) and TIR ops (defined in 
`tir/op.h`).
   
   A naming convention is that:
   - Lowercased methods, for example, `tvm.tir.mul`, means an TIR op, which 
will be eagerly constant-folded, i.e. `mul(1, 2)` returns `3` immediately 
rather than creating an AST node.
   - Capitalized callable, for example, `Mul`, means creating an AST node 
without constant folding.
   
   This PR makes this behavior more explictly by printing `T.Mul(a, b)` 
directly when `a` and `b` are both constants, rather than sugaring it into 
`mul(a. b)` or `a * b`, so that the difference between an op and an AST node is 
clarified.
   
   Co-authored-by: Yaxing Cai <[email protected]>


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