tqchen commented on a change in pull request #6917:
URL: https://github.com/apache/tvm/pull/6917#discussion_r530398968
##########
File path: src/runtime/graph/graph_runtime.cc
##########
@@ -244,6 +250,43 @@ void GraphRuntime::ShareParams(const GraphRuntime& other,
dmlc::Stream* strm) {
this->SetupOpExecs();
}
+void GraphRuntime::LinkedNDArrayDeleter(Object* container) {
+ // container is the NDArray::Container which needs to get deleted.
+ // The data member points to global const memory, so it does not need
deleting.
+ delete reinterpret_cast<NDArray::Container*>(container);
Review comment:
Should be static cast instead, since NDArray::Container* is a subclass
of Object*, this can cause bug when Container and Object have a different offset
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]