Skip to content

Commit

Permalink
Graph executor: remove unnecessary unique_ptr, NFC (apache#8214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Parzyszek authored Jun 9, 2021
1 parent 5dc9627 commit 8a04efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/graph_executor/graph_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8a04efa

Please sign in to comment.