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

Move MKLDNN debug message under MXNET_MKLDNN_DEBUG #13662

Merged
merged 2 commits into from
Dec 20, 2018

Conversation

pengzhao-intel
Copy link
Contributor

@pengzhao-intel pengzhao-intel commented Dec 17, 2018

Description

Move the debug message (Allocate * bytes with malloc directly) under the environment variable to avoid the confusion for the end user.

@TaoLv

Before change:

(base) [patric@mlt-gpu206 image-classification]$ python benchmark_score.py --network=resnetv1-50 --batch-size=16
INFO:root:network: resnetv1-50
INFO:root:device: cpu(0)
/home/patric/develop/mkldnn-update/python/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['softmax_label'])
warnings.warn(msg)
[17:09:25] src/operator/nn/mkldnn/mkldnn_base.cc:74: Allocate 147456 bytes with malloc directly
[17:09:25] src/operator/nn/mkldnn/mkldnn_base.cc:74: Allocate 589824 bytes with malloc directly
[17:09:25] src/operator/nn/mkldnn/mkldnn_base.cc:74: Allocate 2359296 bytes with malloc directly
[17:09:25] src/operator/nn/mkldnn/mkldnn_base.cc:74: Allocate 9437184 bytes with malloc directly
INFO:root:batch size 16, dtype float32, images/sec: 209.347207

After change:

(base) [patric@mlt-gpu206 image-classification]$ python benchmark_score.py --network=resnetv1-50 --batch-size=16
INFO:root:network: resnetv1-50
INFO:root:device: cpu(0)
/home/patric/develop/mkldnn-update/python/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['softmax_label'])
warnings.warn(msg)
INFO:root:batch size 16, dtype float32, images/sec: 206.424535

With the ENV setting:

base) [patric@mlt-gpu206 image-classification]$ export MXNET_MKLDNN_DEBUG=1
(base) [patric@mlt-gpu206 image-classification]$ python benchmark_score.py --network=resnetv1-50 --batch-size=16
INFO:root:network: resnetv1-50
INFO:root:device: cpu(0)
/home/patric/develop/mkldnn-update/python/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['softmax_label'])
warnings.warn(msg)
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test Convolution
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test BatchNorm
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test Activation
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test Pooling
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test Convolution
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test BatchNorm
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test Activation
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:74: Allocate 147456 bytes with malloc directly
[17:11:51] src/operator/nn/mkldnn/mkldnn_base.cc:516: test Convolution
....

@TaoLv TaoLv added Environment Variables Issues related to setting env vars MKLDNN labels Dec 17, 2018
@pengzhao-intel
Copy link
Contributor Author

@xcgoner who is the original requester :)

@pengzhao-intel
Copy link
Contributor Author

FYI, @ChangMarkLiu

@TaoLv
Copy link
Member

TaoLv commented Dec 18, 2018

Do we want to expose MXNET_MKLDNN_DEBUG to front users?

@pengzhao-intel
Copy link
Contributor Author

@TaoLv NO, for the developer rather than the end user.

@pengzhao-intel
Copy link
Contributor Author

@zheng-da could you help take a look?

@TaoLv TaoLv merged commit 8413180 into apache:master Dec 20, 2018
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Environment Variables Issues related to setting env vars MKLDNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants