Lunderberg edited a comment on pull request #39: URL: https://github.com/apache/tvm-rfcs/pull/39#issuecomment-937008706
True, and that would allow both for user-defined mappings, and for specifying standard layouts. I have a bit of concern with using the `scope` parameter to also describe layouts, since in my mind "scope" refers to where the entire buffer is located, while "layout" refers to how individual elements are arranged within the buffer. Two buffers that have the same layout and different scopes could be `memcpy`-ed between the two scopes without additional rearrangement, and that would be obscured if the `scope` parameter is used to define both the scope and the layout. I really like that idea of building the TIR representation based on the provided function. Like with `te.compute`, that gives a convenient way to allow the library to handle the var/primexpr building, so long as the user provides the function to compute the physical indices. Edit: The signature could also be made more similar to `te.compute` by having the index variables be passed in individually (e.g. `lambda n,h,w,c: [n,c,h,w]`) rather than as a single list. This would avoid having unnecessarily different interfaces between the two. -- 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]
