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

Commit

Permalink
Change MXNET_MKLDNN_DEBUG define name to MXNET_ONEDNN_DEBUG (#20031)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekkuncer authored Mar 16, 2021
1 parent b8dc162 commit 3c69993
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/operator/nn/mkldnn/mkldnn_base-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ bool MKLDNNStorageType(const nnvm::NodeAttrs &attrs,
std::vector<int> *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);

Expand Down
4 changes: 2 additions & 2 deletions src/operator/nn/mkldnn/mkldnn_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3c69993

Please sign in to comment.