diff --git a/src/common/utils.h b/src/common/utils.h index 96949a047fba..37e19fa90cdf 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -468,6 +468,10 @@ inline void LogStorageFallback(const nnvm::NodeAttrs& attrs, "0 to suppress this warning."; os << "\nStorage type fallback detected:\n" << op_str << warning; LogOnce(os.str()); +#if MXNET_USE_MKLDNN == 1 + if (!MKLDNNEnvSet()) common::LogOnce("MXNET_MKLDNN_ENABLED flag is off. " + "You can re-enable by setting MXNET_MKLDNN_ENABLED=1"); +#endif } // heuristic to dermine number of threads per GPU diff --git a/src/executor/attach_op_execs_pass.cc b/src/executor/attach_op_execs_pass.cc index 5c974fe4edfd..c011c1d9ce03 100644 --- a/src/executor/attach_op_execs_pass.cc +++ b/src/executor/attach_op_execs_pass.cc @@ -261,13 +261,6 @@ void CreateOpExecs(const Graph& g, OpExecVector* p_ret, size_t i) { const auto& vshape = g.GetAttr("shape"); const auto& vctx = g.GetAttr("context"); const auto& dispatch_modes = g.GetAttr("dispatch_mode"); - -#if MXNET_USE_MKLDNN == 1 - if (!MKLDNNEnvSet()) common::LogOnce("MXNET_MKLDNN_ENABLED flag is off. " - "You can re-enable by setting MXNET_MKLDNN_ENABLED=1"); -#endif - - // get the graph const auto& idx = g.indexed_graph(); OpExecVector& ret = *p_ret;