Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
fbc50692
Commit
fbc50692
authored
Feb 11, 2019
by
gaurides
Committed by
Scott Cyphers
Feb 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak (#2409)
* Fix memory leak * Add comments
parent
4731b6e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
mkldnn_emitter.cpp
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
+4
-0
mkldnn_utils.hpp
src/ngraph/runtime/cpu/mkldnn_utils.hpp
+1
-0
No files found.
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
View file @
fbc50692
...
...
@@ -36,6 +36,10 @@ MKLDNNEmitter::~MKLDNNEmitter()
{
for
(
auto
p
:
m_mkldnn_primitives
)
delete
p
;
//To avoid memory leak in mkldnn, release any buffers that are not free'd yet.
//https://software.intel.com/en-us/mkl-linux-developer-guide-avoiding-memory-leaks-in-intel-mkl
//mkl_free_buffers() is not exposed at this point, hence using mkl_serv_free_buffers()
mkldnn_utils
::
mkl_serv_free_buffers
();
}
const
std
::
vector
<
mkldnn
::
primitive
*>&
MKLDNNEmitter
::
get_mkldnn_primitives
()
const
...
...
src/ngraph/runtime/cpu/mkldnn_utils.hpp
View file @
fbc50692
...
...
@@ -34,6 +34,7 @@ namespace ngraph
namespace
mkldnn_utils
{
extern
mkldnn
::
engine
global_cpu_engine
;
extern
"C"
void
mkl_serv_free_buffers
();
mkldnn
::
memory
::
format
CreateNativeDataFormat
(
const
ngraph
::
runtime
::
cpu
::
LayoutDescriptor
&
layout
);
...
...
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