cee1 edited a comment on pull request #405:
URL: https://github.com/apache/tvm/pull/405#issuecomment-1018239341


   > Hi @tqchen , May I ask a question? Why should we erase for Variable op?
   > 
   > void Visit_(const Variable* op) final { if (touched_.count(op)) { 
touched_.erase(op); } }
   
   We've experienced a problem due to this "touched_.erase(...)"
   
   Background:Try to combine double buffer with cuda WMMA intrin, the TIR looks 
like
   
   ```
   for (k.outer.outer.outer: int32, 0, 2) {
   attr [im2col_reshape.shared] "double_buffer_write" = 1;
       for (...) {
           xxx_shared[...] = place_holder[...] // load next part
       }
   }
   
   ...
   for (...) {
       @tir.tvm_load_matrix_sync(..., 
@tir.tvm_access_ptr(@tir.type_annotation(, dtype=int8),  xxx_shared, ...), ...)
   }
   ```
   Here, the CallNode `@tir.tvm_access_ptr` references VarNode `xxx_shared` as 
its parameter.
   
   Then, it will be removed from result of `DoubleBufferDetector`, aka 
`touched_.erase(op)`


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