yongwww commented on code in PR #15882: URL: https://github.com/apache/tvm/pull/15882#discussion_r1355061713
########## src/runtime/memory/memory_manager.cc: ########## @@ -101,6 +100,11 @@ NDArray StorageObj::AllocNDArray(size_t offset, ShapeTuple shape, DLDataType dty // buffer intact. container->manager_ctx = reinterpret_cast<void*>(this); + // The only change we make w.r.t offset is modifying the data pointer + // of the backing tensor to point into the buffer instead of its start. + auto offset_ptr = reinterpret_cast<uint8_t*>(this->buffer.data) + offset; Review Comment: This change has been submitted to main: https://github.com/apache/tvm/pull/15912 -- 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]
