Why storage rewrite's access analysis do not consider tvm_access_ptr()?

https://github.com/apache/tvm/blob/main/src/tir/transforms/storage_rewrite.cc#L137

In storage rewrite pass, tvm_access_ptr() is detected and rewrite in StoragePlanRewriter step. However, in LinearAccessPatternFinder step it is not processed. Why it is not treated as a memory buffer touch in the analysis step?

Since there is no tvm_access_ptr in cpu/gpu memory planning. If you want to support accelerators in which you need to manage lots of intrinsic with tvm_access_ptr,you may need to extend this pass. You can refer akg/storage_rewrite_cce.cc at main · xqdan/akg · GitHub

1 Like