JosephTheOctonaut commented on PR #80:
URL: https://github.com/apache/tvm-rfcs/pull/80#issuecomment-1183758823

   Hmm I hadn't thought of the duplication issue for branches in `wait`. Some 
initial ideas:
   
   - Would additional unrolling (as with the pipeline prologue and epilogue) 
help solve the issue? Or would it just create a new branch condition in the 
longer prologue?
   - Could we put a non-constant expression in the annotation? E.g., 
`async_wait_group(1, 1 if i==0 else 0)`?
   - Could we alter semantics around `wait` usage? Right now, it's guarding the 
statements in the block it annotates, but it also guards all sequentially later 
blocks as well, correct? So we could annotate empty blocks, with the subsequent 
blocks containing the compute statement. (This feels like an abuse of program 
structure and annotations to me, though.) Something like this:
   
   ```
   with block():
     with block():
       T.where(i < 1):
         async_wait_group(1, 1)
     with block():
       T.where(i > 0):
         async_wait_group(1, 0)
     D[(i + 14) % 2] = C[(i + 14) % 2] + 1
   ```


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