masahi commented on pull request #8571: URL: https://github.com/apache/tvm/pull/8571#issuecomment-888836469
> Can we reuse buffers that are out of the lifetime in the new pass? To be specific, please see the following example: > > ``` > A_shared[i] = A[i] > A_local[i] = A_shared[i] > C_local[i] = A_local[i] + 1 > C_shared[i] = C_local[i] > ``` > > Since `A_shared[i]` is never used when we store to `C_shared`. We can directly store the data into `A_shared[i]` to reduce memory usage. It is supported in `storage_rewrite` Thanks, I didn't think about reuse support. To support this, I think it is better to drop the new pass in this PR and merge the new functionality to `storage_rewrite` pass. I'll consider both possibilities and try to find the simplest solution. -- 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]
