ZhennanQin commented on a change in pull request #13903: mkldnn s8 conv API 
change for master
URL: https://github.com/apache/incubator-mxnet/pull/13903#discussion_r249612548
 
 

 ##########
 File path: src/ndarray/ndarray.cc
 ##########
 @@ -168,16 +168,28 @@ nnvm::Symbol NDArray::get_autograd_symbol() const {
 
 #if MXNET_USE_MKLDNN == 1
 
-NDArray::NDArray(const mkldnn::memory *mkldnn_mem, bool static_data)
 
 Review comment:
   If static_data=false, then NDArray will take responsible to free this memory 
at deconstruction. But it has a double free risk that if mkldnn_mem be freed 
outside. I agreed that it's not a good design, so I changed it to 
std::shared_ptr<mkldnn::memory> to avoid the chance of double free.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to