Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Move the debug output message into MXNET_MKLDNN_DEBUG (#13662)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatricZhao authored and TaoLv committed Dec 20, 2018
1 parent 61744b5 commit 8413180
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/operator/nn/mkldnn/mkldnn_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8413180

Please sign in to comment.