dprankratz commented on pull request #5666:
URL: https://github.com/apache/incubator-tvm/pull/5666#issuecomment-643808103


   @tqchen I did some more digging into using let nodes. Consider the following 
expression:
   ```
   floormod(floormod(a,b),floormod(c,d))
   ```
   `floormod(a,b)` becomes `let rmod1 = (a % b) in (expression with multiple 
rmod1)`
   `floormod(c,d)` becomes `let rmod2 = (c % d) in (expression with multiple 
rmod2)`
   
   Then composing those with another `floormod` ends up creating multiple 
copies of the let statements using rmod1 and rmod2. 
   
   `floormod(floormod(a,b),floormod(c,d))` becomes
   ```
   let rmod3 = (let rmod1 = .... in ....) % (let rmod2 = ... in ....) in
      (expression with multiple rmod3)
   ```
   The net effect is that multiple `rmod3` copies are materialized which 
contain `LetNodes` for `rmod1` and `rmod2` which have the same address.  This 
ends up failing the `VarUseDefAnalysis` pass since it believes the 
redefinitions of `rmod1` and `rmod2` break SSA.  
   
   Is there an easy solution to this problem?
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to