vinx13 commented on issue #10505: URL: https://github.com/apache/tvm/issues/10505#issuecomment-1062098266
While `tir.noalias` property still hold for `PrimFunc` args, `T.decl_buffer` creates a buffer alias if the underlying data variable (`.data` field) overlaps with another buffer. Buffer created via `alloc_buffer` always do not alias. Buffer aliases do not need `Allocate` to create the data variable. Each data variable can be allocated via `Allocate` once. Buffers should not alias each other unless necessary, because aliased buffers increase complexity for TIR transformations. Passes that rewrite buffers should clearly indicate how aliased buffers are handled. For example, when changing the underlying layout of stored elements in a buffer, all buffer aliases must also be updated. While buffer aliasing is typically free at runtime, this imposes a cost for buffer aliasing both to compile times and development complexity. We should also extend `VeryfySSA` pass to also take buffer into consideration. -- 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]
