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

   Long-term, I'd like to move some of the purity inference out of the parser 
and into a later transformation pass.  The sequence of PRs would look something 
like the following:
   
   1. Update `FuncStructInfo::purity` to have type `Optional<Bool>` rather than 
`bool`.  This would allow it to express a function whose purity is unknown, 
similar to the unknown shape/dtype options allowed in `TensorStructInfo`.
   2. Update the defaults to produce `NullOpt` if the user hasn't specified the 
function's purity.  (Mostly done in this PR.)  When inspecting a function body, 
calls to a subroutine with `NullOpt` purity mean that we cannot mark the 
function as pure.  No further local analysis would be done at that point.
   3. Introduce a separate pass for handling the recursive/mutually-recursive 
cases.


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