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
dlib
Commits
ee091851
Commit
ee091851
authored
Mar 05, 2017
by
Davis King
Browse files
Fixed a slow memory leak that occurred when using cuDNN and tensors were created.
parent
84cd330c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
dlib/dnn/cudnn_dlibapi.cpp
dlib/dnn/cudnn_dlibapi.cpp
+5
-7
No files found.
dlib/dnn/cudnn_dlibapi.cpp
View file @
ee091851
...
@@ -191,15 +191,13 @@ namespace dlib
...
@@ -191,15 +191,13 @@ namespace dlib
int
nc
int
nc
)
)
{
{
if
(
n
==
0
||
nr
==
0
||
nc
==
0
||
k
==
0
)
if
(
handle
)
{
{
if
(
handle
)
cudnnDestroyTensorDescriptor
((
cudnnTensorDescriptor_t
)
handle
);
{
handle
=
nullptr
;
cudnnDestroyTensorDescriptor
((
cudnnTensorDescriptor_t
)
handle
);
handle
=
nullptr
;
}
}
}
else
if
(
n
!=
0
&&
nr
!=
0
&&
nc
!=
0
&&
k
!=
0
)
{
{
cudnnTensorDescriptor_t
h
;
cudnnTensorDescriptor_t
h
;
CHECK_CUDNN
(
cudnnCreateTensorDescriptor
(
&
h
));
CHECK_CUDNN
(
cudnnCreateTensorDescriptor
(
&
h
));
...
...
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