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

Confusing warning message when mkldnn is turned off #18019

Closed
eric-haibin-lin opened this issue Apr 10, 2020 · 4 comments · Fixed by #20700
Closed

Confusing warning message when mkldnn is turned off #18019

eric-haibin-lin opened this issue Apr 10, 2020 · 4 comments · Fixed by #20700

Comments

@eric-haibin-lin
Copy link
Member

MKLDNN does not expose any special storage type to users, the warning message will make ordinary user confused.
MXNET_MKLDNN_ENABLED=0 python3

Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mxnet as mx
>>> x = mx.nd.ones((1))
>>> net = mx.gluon.nn.Dense(10)
>>> net.initialize(mx.init.Uniform())
>>> net(x)
[16:50:26] src/operator/contrib/../tensor/./../../common/utils.h:473:
Storage type fallback detected:
operator = FullyConnected
input storage types = [default, default, default, ]
output storage types = [default, ]
params = {"no_bias" : False, "__profiler_scope__" : <unk>:, "flatten" : True, "num_hidden" : 10, }
context.dev_mask = cpu
The operator with default storage type will be dispatched for execution. You're seeing this warning message because the operator above is unable to process the given ndarrays with specified storage types, context and parameter. Temporary dense ndarrays are generated in order to execute the operator. This does not affect the correctness of the programme. You can set environment variable MXNET_STORAGE_FALLBACK_LOG_VERBOSE to 0 to suppress this warning.
[16:50:26] src/operator/contrib/../tensor/./../../common/utils.h:473: MXNET_MKLDNN_ENABLED flag is off. You can re-enable by setting MXNET_MKLDNN_ENABLED=1

[[ 0.0068339   0.01299825  0.0301265   0.04819721  0.01438687  0.05011239
   0.00628365  0.04861524 -0.01068833  0.01729892]]
<NDArray 1x10 @cpu(0)>
>>>
>>>

@TaoLv

@TaoLv
Copy link
Member

TaoLv commented Apr 11, 2020

@eric-haibin-lin The storage fallback logic is reused for disabling MKL-DNN at runtime. See #12058 (comment).

@TaoLv
Copy link
Member

TaoLv commented Apr 11, 2020

It's mainly due to InferStorageType is not only used for sparse/dense dispatching, but also for MKL-DNN operator dispatching.

@eric-haibin-lin
Copy link
Member Author

yes.. but it's still confusing to other users

@pengzhao-intel
Copy link
Contributor

@anko-intel

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants