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

Commit

Permalink
move logonce inside fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Aug 15, 2018
1 parent 9e53fdc commit 3bc949f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions src/executor/attach_op_execs_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,6 @@ void CreateOpExecs(const Graph& g, OpExecVector* p_ret, size_t i) {
const auto& vshape = g.GetAttr<ShapeVector>("shape");
const auto& vctx = g.GetAttr<ContextVector>("context");
const auto& dispatch_modes = g.GetAttr<DispatchModeVector>("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;
Expand Down

0 comments on commit 3bc949f

Please sign in to comment.