tqchen edited a comment on pull request #7385:
URL: https://github.com/apache/tvm/pull/7385#issuecomment-771192686


   Thanks @masahi . I think it is great to enable support for some form of 
While loop.
   
   It would be great to have an RFC thread discussing the alternatives in the 
IR node design. Since the IR node design can impact the general ability to do 
analysis and will impact how would we engineer future transformation passes.
   
   For example, I can see two possible variants:
   
   - V0: Put the condition into the for loop as it is (the current approach)
   - V1: Introduce a separate While node for while loops
   
   V0 means the for loop is somewhat overloaded for both while and For. On one 
hand it brings the benefit of richer semantics and the minimum set of changes 
to enable such feature.
   
   This does mean that the visitors to For would need to handle the semantics 
of break. Given that the for loop is used for regular interval analysis, it 
could be beneficial to distinguish between "regular structured loop" vs 
"un-structured loop", unless the condition testing also offers some analysis 
benefits.
   
   I think this PoC is a great start and would be great to have a design 
discussion over the RFC
   
   
   
   


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