Lunderberg commented on PR #14318:
URL: https://github.com/apache/tvm/pull/14318#issuecomment-1473921109

   Thank you @cyx-6 , and those are definitely good reasons.  I like the 
general simplifications, and that especially makes sense to re-use the 
auto-value promotion.
   
   > Actually, the constants folding only occurs between non-PrimExpr, like 1 + 
1, and some IntImm, FloatImm.
   
   As a slight correction here, you can also get constant folding between two 
PrimExpr, such as `tvm.tir.Var('x','int32') + tvm.tir.IntImm('int32',0)`, but 
your general point holds.
   
   > The primary reason we are changing this is for consistency with python 
interface.
   
   Hmm, good point.  I had been seeing TVMScript as primarily a representation 
of the underlying TIR/Relax, rather than a scripting language in itself.  As a 
representation, it should match the underlying TIR/Relax as much as possible 
and avoid constant folding, whereas a scripting language should produce the 
best output and perform constant folding.
   
   I suppose my key question is: should TVMScript be viewed as a compact 
representation of TIR/Relax, or as a scripting language?


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