This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 8a04efa  Graph executor: remove unnecessary unique_ptr, NFC (#8214)
8a04efa is described below

commit 8a04efa3a65ca90b341cbc821b12ada59db88300
Author: Krzysztof Parzyszek <kparz...@quicinc.com>
AuthorDate: Wed Jun 9 09:25:34 2021 -0500

    Graph executor: remove unnecessary unique_ptr, NFC (#8214)
---
 src/runtime/graph_executor/graph_executor.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/runtime/graph_executor/graph_executor.cc 
b/src/runtime/graph_executor/graph_executor.cc
index ad5b99e..1084b4e 100644
--- a/src/runtime/graph_executor/graph_executor.cc
+++ b/src/runtime/graph_executor/graph_executor.cc
@@ -267,10 +267,10 @@ void GraphExecutor::DefaultLookupLinkedParam(TVMArgs 
args, TVMRetValue* rv) {
   std::vector<int64_t> shape_vec{template_tensor->shape,
                                  template_tensor->shape + 
template_tensor->ndim};
 
-  std::unique_ptr<NDArray::Container> container{new NDArray::Container(
-      static_cast<void*>(opaque_handle), shape_vec, template_tensor->dtype, 
dev)};
+  auto* container = new NDArray::Container(static_cast<void*>(opaque_handle), 
shape_vec,
+                                           template_tensor->dtype, dev);
   container->SetDeleter(GraphExecutor::LinkedNDArrayDeleter);
-  *rv = NDArray(GetObjectPtr<Object>(container.release()));
+  *rv = NDArray(GetObjectPtr<Object>(container));
 }
 
 void GraphExecutor::SetupStorage() {

Reply via email to