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

   Avoid folding constants while parsing TVMScript.  This looks like a bug, 
which was introduced as part of the parsing changes implemented in 
https://github.com/apache/tvm/pull/14200.
   
   The operator overloads in python delegate to the C++ operator overloads, 
which perform constant folding.  While useful in most circumstances, the script 
parsing should avoid performing any manipulations while parsing, as this can 
invalidate unit tests that rely on known TIR inputs.  This wasn't caught by any 
of the existing unit tests in `test_tvmscript_roundtrip.py`, as the inputs to 
those unit tests are generated by the parsing, and already have their constants 
folded.
   
   There are a few edge cases that would still be constant-folded while parsing 
the TVMScript, but these only impact subexpressions that do not contain 
TVM-specific constructs.  For example, `T.evaluate(1 + 2)` would be parsed as 
`T.evaluate(3)`, because the `1 + 2` subexpression is evaluated during parsing.


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