MasterJH5574 edited a comment on pull request #8693: URL: https://github.com/apache/tvm/pull/8693#issuecomment-896746839
I wrote the origin code that "go up straight to find the allocation site", which is first used in primitive `SetScope`. `SetScope` also specify the target buffer by one of its producer block and a `write_buffer_index`. Probably Wuwei just reused the part of code, so it's my fault 🤐:sweat:. From my POV, the interface was designed like this mainly because `CacheRead` and `CacheWrite` specify the target buffer by a block and a index. Therefore I inherited the interface in `CacheRead` and `CacheWrite`. At that time I thought that "specifying a buffer directly on the allocation side is impossible", but after a second thought today... Of course we can do that. So ATM I think specifying the target buffer from the allocation side by `alloc_buffer_index` is much more convenient. Would like to hear your opinions :-) -- 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]
