Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
1947d87d
"docker/vscode:/vscode.git/clone" did not exist on "70ee86648bc44507792bfe1b1b31858e0f56658a"
Unverified
Commit
1947d87d
authored
Aug 23, 2022
by
Xin Yao
Committed by
GitHub
Aug 23, 2022
Browse files
fix unpinning when tensoradaptor is not available (#4450)
parent
7a41c126
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/runtime/ndarray.cc
src/runtime/ndarray.cc
+2
-1
No files found.
src/runtime/ndarray.cc
View file @
1947d87d
...
...
@@ -67,6 +67,7 @@ struct NDArray::Internal {
ptr
->
mem
=
nullptr
;
}
else
if
(
ptr
->
dl_tensor
.
data
!=
nullptr
)
{
// if the array is still pinned before freeing, unpin it.
if
(
ptr
->
pinned_by_dgl_
)
UnpinContainer
(
ptr
);
dgl
::
runtime
::
DeviceAPI
::
Get
(
ptr
->
dl_tensor
.
ctx
)
->
FreeDataSpace
(
ptr
->
dl_tensor
.
ctx
,
ptr
->
dl_tensor
.
data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment