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

Commit 54ca02a

Browse files
[master] Make warning message when oneDNN is turned off less confusing (#20700)
* Make warning message when oneDNN is turned off less confusing Co-authored-by: Anna, Karbownik <anna.karbownik@intel.com> * Apply clang-format * Update utils.h Co-authored-by: Anna, Karbownik <anna.karbownik@intel.com>
1 parent 94fc557 commit 54ca02a

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/common/utils.h

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -503,20 +503,24 @@ inline void LogStorageFallback(const nnvm::NodeAttrs& attrs,
503503
const std::string op_str = operator_stype_string(attrs, dev_mask, *in_attrs, *out_attrs);
504504
std::ostringstream os;
505505
const char* warning =
506-
"\nThe operator with default storage type will be dispatched "
507-
"for execution. You're seeing this warning message because the operator above is unable "
508-
"to process the given ndarrays with specified storage types, context and parameter. "
509-
"Temporary dense ndarrays are generated in order to execute the operator. "
510-
"This does not affect the correctness of the programme. "
511-
"You can set environment variable MXNET_STORAGE_FALLBACK_LOG_VERBOSE to "
512-
"0 to suppress this warning.";
506+
"\n WARNING:\n"
507+
"Execution of the operator above will fallback to the generic implementation "
508+
#if MXNET_USE_ONEDNN == 1
509+
"(not utilizing kernels from oneDNN library) "
510+
#endif
511+
"with default dense storage type. You are seeing this warning message because "
512+
#if MXNET_USE_ONEDNN == 1
513+
"MXNET_ONEDNN_ENABLED flag is set to 0, in which case you can re-enable the default "
514+
"execution path by setting MXNET_ONEDNN_ENABLED back to 1, or "
515+
#endif
516+
"the operator above is unable to process the given ndarrays with specified storage types, "
517+
"context and/or parameter, in which case temporary dense ndarrays are generated in order to "
518+
"execute the operator. The fallback does not affect the correctness of the programme. Using "
519+
"default storage type performance degradation might be observed. \nYou can set environment "
520+
"variable MXNET_STORAGE_FALLBACK_LOG_VERBOSE to 0 to suppress this warning.";
513521
os << "\nStorage type fallback detected:\n" << op_str << warning;
514522
LogOnce(os.str());
515523
#if MXNET_USE_ONEDNN == 1
516-
if (!DNNLEnvSet())
517-
common::LogOnce(
518-
"MXNET_ONEDNN_ENABLED flag is off. "
519-
"You can re-enable by setting MXNET_ONEDNN_ENABLED=1");
520524
if (GetDNNLCacheSize() != -1)
521525
common::LogOnce(
522526
"MXNET_ONEDNN_CACHE_NUM is set."

0 commit comments

Comments
 (0)