You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/01/21 07:07:29 UTC

[GitHub] [tvm] cee1 commented on pull request #405: [PASS] InjectDoubleBuffer

cee1 commented 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 apply double buffer to 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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org