From f506ada977a4b57b0089c1a41a535731de4d31e6 Mon Sep 17 00:00:00 2001 From: Bartosz Kuncer Date: Tue, 16 Mar 2021 09:11:09 +0100 Subject: [PATCH] Change MXNET_MKLDNN_DEBUG define name to MXNET_ONEDNN_DEBUG --- ci/docker/runtime_functions.sh | 12 ++++++------ src/operator/nn/mkldnn/mkldnn_base-inl.h | 2 +- src/operator/nn/mkldnn/mkldnn_base.cc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 4a94449c9379..078b4ffb7df6 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -724,7 +724,7 @@ cd_unittest_ubuntu() { set -ex source /opt/rh/rh-python36/enable export PYTHONPATH=./python/ - export MXNET_MKLDNN_DEBUG=0 # Ignored if not present + export MXNET_ONEDNN_DEBUG=0 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 export MXNET_SUBGRAPH_VERBOSE=0 export MXNET_ENABLE_CYTHON=0 @@ -764,7 +764,7 @@ cd_unittest_ubuntu() { unittest_ubuntu_python3_cpu() { set -ex export PYTHONPATH=./python/ - export MXNET_MKLDNN_DEBUG=0 # Ignored if not present + export MXNET_ONEDNN_DEBUG=0 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 export MXNET_SUBGRAPH_VERBOSE=0 export MXNET_ENABLE_CYTHON=0 @@ -778,7 +778,7 @@ unittest_ubuntu_python3_cpu() { unittest_ubuntu_python3_cpu_mkldnn() { set -ex export PYTHONPATH=./python/ - export MXNET_MKLDNN_DEBUG=0 # Ignored if not present + export MXNET_ONEDNN_DEBUG=0 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 export MXNET_SUBGRAPH_VERBOSE=0 export MXNET_ENABLE_CYTHON=0 @@ -793,7 +793,7 @@ unittest_ubuntu_python3_cpu_mkldnn() { unittest_ubuntu_python3_gpu() { set -ex export PYTHONPATH=./python/ - export MXNET_MKLDNN_DEBUG=0 # Ignored if not present + export MXNET_ONEDNN_DEBUG=0 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 export MXNET_SUBGRAPH_VERBOSE=0 export CUDNN_VERSION=${CUDNN_VERSION:-7.0.3} @@ -811,7 +811,7 @@ unittest_ubuntu_python3_gpu() { unittest_ubuntu_python3_gpu_cython() { set -ex export PYTHONPATH=./python/ - export MXNET_MKLDNN_DEBUG=1 # Ignored if not present + export MXNET_ONEDNN_DEBUG=1 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 export MXNET_SUBGRAPH_VERBOSE=0 export CUDNN_VERSION=${CUDNN_VERSION:-7.0.3} @@ -978,7 +978,7 @@ test_ubuntu_cpu_python3() { unittest_ubuntu_python3_arm() { set -ex export PYTHONPATH=./python/ - export MXNET_MKLDNN_DEBUG=0 # Ignored if not present + export MXNET_ONEDNN_DEBUG=0 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 export MXNET_SUBGRAPH_VERBOSE=0 export MXNET_ENABLE_CYTHON=0 diff --git a/src/operator/nn/mkldnn/mkldnn_base-inl.h b/src/operator/nn/mkldnn/mkldnn_base-inl.h index 9f8e4eb25d9b..addfa16157cb 100644 --- a/src/operator/nn/mkldnn/mkldnn_base-inl.h +++ b/src/operator/nn/mkldnn/mkldnn_base-inl.h @@ -684,7 +684,7 @@ bool MKLDNNStorageType(const nnvm::NodeAttrs &attrs, std::vector *out_attrs); #define MKLDNN_OPCHECK_INIT(backward, num_checks, inputs, outputs) \ - static bool debug = dmlc::GetEnv("MXNET_MKLDNN_DEBUG", false); \ + static bool debug = dmlc::GetEnv("MXNET_ONEDNN_DEBUG", false); \ OpCheck check(backward, num_checks); \ if (debug) check.Init(inputs, outputs); diff --git a/src/operator/nn/mkldnn/mkldnn_base.cc b/src/operator/nn/mkldnn/mkldnn_base.cc index d4cb9780ab28..f82570093418 100644 --- a/src/operator/nn/mkldnn/mkldnn_base.cc +++ b/src/operator/nn/mkldnn/mkldnn_base.cc @@ -74,7 +74,7 @@ mkldnn::memory *TmpMemMgr::Alloc(const mkldnn::memory::desc &md) { // then re-requests abundant space from MXNet resource. MKL-DNN could allocate // the space by itself. Thus, we just let it continue for estimating the maximum // required space size. It will be allocated at next call. - if (this->curr_mem && dmlc::GetEnv("MXNET_MKLDNN_DEBUG", false)) { + if (this->curr_mem && dmlc::GetEnv("MXNET_ONEDNN_DEBUG", false)) { LOG(WARNING) << "mkl-dnn debug message: The rest of the temporary space is not " << "adequate for allocating " << md.get_size() << " bytes. Thus, mkl-dnn " << "allocate the space by itself."; @@ -565,7 +565,7 @@ void OpCheck::Run(mxnet::FCompute fn, const nnvm::NodeAttrs &attrs, for (size_t i = 0; i < out_blobs.size(); i++) out_blobs[i] = outputs[i].data(); fn(attrs, ctx, in_blobs, req, out_blobs); - if (dmlc::GetEnv("MXNET_MKLDNN_DEBUG", false)) + if (dmlc::GetEnv("MXNET_ONEDNN_DEBUG", false)) LOG(INFO) << "test " << attrs.op->name; size_t num = std::min(outputs.size(), outputs_.size()); num = std::min(num_checks, num);