TaoLv closed pull request #13662: Move MKLDNN debug message under
MXNET_MKLDNN_DEBUG
URL: https://github.com/apache/incubator-mxnet/pull/13662
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/src/operator/nn/mkldnn/mkldnn_base.cc
b/src/operator/nn/mkldnn/mkldnn_base.cc
index 5db51817db9..5da55f4ca70 100644
--- a/src/operator/nn/mkldnn/mkldnn_base.cc
+++ b/src/operator/nn/mkldnn/mkldnn_base.cc
@@ -70,9 +70,10 @@ mkldnn::memory *TmpMemMgr::Alloc(const
mkldnn::memory::primitive_desc &pd) {
} else {
// If curr_mem has been initialized and we still reach here. It means
// the current allocated memory isn't enough.
- if (this->curr_mem)
+ if (this->curr_mem && dmlc::GetEnv("MXNET_MKLDNN_DEBUG", false)) {
LOG(WARNING) << "Allocate " << pd.get_size()
<< " bytes with malloc directly";
+ }
mkldnn_mem_ptr ret(new mkldnn::memory(pd));
MKLDNNStream::Get()->RegisterMem(ret);
return ret.get();
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services