altanh opened a new pull request #10078:
URL: https://github.com/apache/tvm/pull/10078


   Previously, ANF conversion would bind Let expressions directly as the value 
of a fresh Let binding, breaking atomicity. This PR pushes the bindings of the 
inner Let into the outer scope (where the fresh Let binding would be pushed), 
and binds the body of the inner Let to the fresh variable instead.
   
   Example ANF IR before this change:
   ```
   let %x = (
     let %y = 1;
     let %z = %y * %y;
     %z
   );
   %x
   ```
   
   ANF IR after this change:
   ```
   let %y = 1;
   let %z = %y * %y;
   let %x = %z;
   %x
   ```
   
   cc @mbs-octoml 
   


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