>From https://github.com/apache/incubator-mxnet/issues/19610:

> Intel MKL-DNN was renamed with DNNL in its v1.1 release. Since then, the 
MXNet community has been working on the transition to DNNL to leverage the 
latest features and optimizations from the library. That includes using the 
string “DNNL” or “dnnl” for future development and communication. We propose to 
promote the flag “USE_DNNL” since MXNet 2.0 and start deprecating “USE_MKLDNN” 
at the same time.
> DNNL source code resides in the 3rdparty/mkldnn folder of the MXNet 
repository and is released and distributed along with MXNet source code. If one 
wants to build MXNet with DNNL to accelerate the execution on Intel CPU, she/he 
needs to enable -DUSE_DNNL=ON in CMake. However, this flag has been set to ON 
by default for all platforms except edge devices. On the contrary, to disable 
the DNNL acceleration, one needs to set -DUSE_DNNL=OFF explicitly in the CMake 
command line or the CMake configuration file.
> As both MXNet and DNNL are under quick development with different release 
cadence, we decide to link the DNNL library into MXNet statically to avoid 
mis-linking in the user's environment. Given this, we need to set 
DNNL_LIBRARY_TYPE to STATIC when building DNNL.
> Some additional flags to build DNNL:
> 
> DNNl_CPU_RUNTIME: Need set it to SEQ explicitly when USE_OPENMP=OFF;
> DNNL_ARCH_OPT_FLAGS: Need pass compiler options to this build flag in 
string. Eg. -march or -mtune for GCC.
> MKLDNN_BUILD_TESTS and MKLDNN_BUILD_EXAMPLES: We set these two flags to 
OFF to speed up the compilation.
> One thing that needs to be taken care of is that the header dnnl_config.h 
and dnnl_version.h will be generated dynamically during compilation and will be 
copied to the installation destination when calling make install. That means 
these two headers are not distributed with DNNL source code. For downstream 
projects which are including these headers need to find them in the 
installation path rather than the source code path.

I prepared two commits regarding this point of main RFC:
1. changing USE_MKLDNN flag name to USE_ONEDNN to make it consistent with 
actual library name
I believe that this commit is complete and if there is such a will can be 
merged into master.

2. changing MXNET_USE_MKLDNN* flags names to MXNET_USE_ONEDNN* also for 
consistency reasons
This commit regards changing inner MXNET flag so that it will be consistent 
with the actual lib name. To avoid creating even bigger mixture of 
mkldnn/dnnl/onednn acronyms I believe it should be accompanied with another 
commit changing acronyms used in mxnet function names and comments regarding 
this particular lib to oneDNN. What do you think about it?

There is also another idea to change the 3rdparty/mkldnn folder name to 
3rdparty/onednn for consistency. The problem is that it will create unnecessary 
difference in directories names between branches.
You can view, comment on, or merge this pull request online at:

  https://github.com/apache/incubator-mxnet/pull/19944

-- Commit Summary --

  * Change flag MXNET_USE_MKLDNN to MXNET_USE_ONEDNN
  * Change USE_MKLDNN flag to USE_ONEDNN

-- File Changes --

    M CMakeLists.txt (14)
    M ci/build_windows.py (8)
    M ci/docker/runtime_functions.sh (42)
    M config/darwin.cmake (2)
    M config/distribution/darwin_cpu.cmake (2)
    M config/distribution/darwin_native.cmake (2)
    M config/distribution/linux_cpu.cmake (2)
    M config/distribution/linux_cu100.cmake (2)
    M config/distribution/linux_cu101.cmake (2)
    M config/distribution/linux_cu102.cmake (2)
    M config/distribution/linux_cu110.cmake (2)
    M config/distribution/linux_cu92.cmake (2)
    M config/distribution/linux_native.cmake (2)
    M config/linux.cmake (2)
    M config/linux_gpu.cmake (2)
    M 
docs/python_docs/python/tutorials/performance/backend/mkldnn/mkldnn_readme.md 
(16)
    M docs/static_site/src/pages/api/faq/env_var.md (4)
    M docs/static_site/src/pages/api/faq/perf.md (2)
    M example/multi_threaded_inference/Makefile (2)
    M include/mxnet/base.h (2)
    M include/mxnet/libinfo.h (4)
    M include/mxnet/ndarray.h (14)
    M src/c_api/c_api.cc (8)
    M src/common/exec_utils.h (8)
    M src/common/utils.h (4)
    M src/imperative/attach_op_execs_pass.cc (2)
    M src/imperative/imperative_utils.h (8)
    M src/libinfo.cc (2)
    M src/ndarray/ndarray.cc (22)
    M src/operator/contrib/batch_norm_relu.cc (12)
    M src/operator/leaky_relu.cc (16)
    M src/operator/nn/activation.cc (18)
    M src/operator/nn/batch_norm.cc (12)
    M src/operator/nn/concat.cc (50)
    M src/operator/nn/convolution.cc (16)
    M src/operator/nn/deconvolution.cc (10)
    M src/operator/nn/fully_connected.cc (12)
    M src/operator/nn/log_softmax.cc (8)
    M src/operator/nn/lrn.cc (12)
    M src/operator/nn/mkldnn/mkldnn_act-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_act.cc (2)
    M src/operator/nn/mkldnn/mkldnn_base-inl.h (2)
    M src/operator/nn/mkldnn/mkldnn_base.cc (4)
    M src/operator/nn/mkldnn/mkldnn_batch_norm-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_concat-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_concat.cc (4)
    M src/operator/nn/mkldnn/mkldnn_convolution-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_convolution.cc (4)
    M src/operator/nn/mkldnn/mkldnn_copy.cc (2)
    M src/operator/nn/mkldnn/mkldnn_deconvolution.cc (4)
    M src/operator/nn/mkldnn/mkldnn_fully_connected-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_fully_connected.cc (4)
    M src/operator/nn/mkldnn/mkldnn_log_softmax.cc (2)
    M src/operator/nn/mkldnn/mkldnn_lrn-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_ops-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_pooling-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_pooling.cc (4)
    M src/operator/nn/mkldnn/mkldnn_reshape-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_reshape.cc (2)
    M src/operator/nn/mkldnn/mkldnn_rnn-inl.h (6)
    M src/operator/nn/mkldnn/mkldnn_rnn.cc (4)
    M src/operator/nn/mkldnn/mkldnn_slice-inl.h (4)
    M src/operator/nn/mkldnn/mkldnn_slice.cc (4)
    M src/operator/nn/mkldnn/mkldnn_softmax.cc (2)
    M src/operator/nn/mkldnn/mkldnn_sum.cc (2)
    M src/operator/nn/mkldnn/mkldnn_transpose.cc (2)
    M src/operator/nn/pooling.cc (32)
    M src/operator/nn/softmax.cc (8)
    M src/operator/operator_common.h (6)
    M src/operator/quantization/dequantize.cc (8)
    M src/operator/quantization/mkldnn/mkldnn_dequantize-inl.h (4)
    M src/operator/quantization/mkldnn/mkldnn_quantize-inl.h (4)
    M src/operator/quantization/mkldnn/mkldnn_quantize_v2-inl.h (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_act.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_batch_norm.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_concat.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_conv.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_elemwise_add.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_flatten.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_fully_connected.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_ops-inl.h (4)
    M src/operator/quantization/mkldnn/mkldnn_quantized_pooling.cc (4)
    M src/operator/quantization/mkldnn/mkldnn_requantize-inl.h (4)
    M src/operator/quantization/quantize.cc (6)
    M src/operator/quantization/quantize_v2.cc (8)
    M src/operator/quantization/quantized_activation.cc (2)
    M src/operator/quantization/quantized_batch_norm.cc (4)
    M src/operator/quantization/quantized_conv.cc (12)
    M src/operator/quantization/quantized_fully_connected.cc (10)
    M src/operator/quantization/quantized_pooling.cc (8)
    M src/operator/quantization/requantize.cc (6)
    M src/operator/rnn.cc (24)
    M src/operator/subgraph/mkldnn/mkldnn_bn_relu_property.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_common.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_conv-inl.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_conv.cc (4)
    M src/operator/subgraph/mkldnn/mkldnn_conv_property.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_elemwisemul_post_quantize_property.h 
(4)
    M src/operator/subgraph/mkldnn/mkldnn_fc-inl.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_fc.cc (4)
    M src/operator/subgraph/mkldnn/mkldnn_fc_post_quantize_property.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_fc_property.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_post_quantize_align_scale_property.h 
(4)
    M src/operator/subgraph/mkldnn/mkldnn_post_quantize_property.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_subgraph_base-inl.h (4)
    M src/operator/subgraph/mkldnn/mkldnn_subgraph_property.cc (4)
    M src/operator/subgraph/partitioner/custom_subgraph_property.h (4)
    M src/operator/tensor/amp_cast.cc (12)
    M src/operator/tensor/cast_storage-inl.h (6)
    M src/operator/tensor/elemwise_binary_op_basic.cc (12)
    M src/operator/tensor/elemwise_sum.cc (8)
    M src/operator/tensor/elemwise_unary_op.h (2)
    M src/operator/tensor/elemwise_unary_op_basic.cc (16)
    M src/operator/tensor/matrix_op-inl.h (2)
    M src/operator/tensor/matrix_op.cc (22)
    M src/serialization/cnpy.cc (4)
    M src/storage/cpu_device_storage.h (2)
    M src/storage/storage_manager_helpers.h (2)
    M tests/README.md (4)
    M tests/cpp/include/test_mkldnn.h (4)
    M tests/cpp/include/test_util.h (2)
    M tests/cpp/operator/batchnorm_test.cc (4)
    M tests/cpp/operator/mkldnn_operator_test.cc (4)
    M tests/cpp/operator/mkldnn_test.cc (4)
    M tests/cpp/storage/storage_test.cc (2)

-- Patch Links --

https://github.com/apache/incubator-mxnet/pull/19944.patch
https://github.com/apache/incubator-mxnet/pull/19944.diff

-- 
You are receiving this because your review was requested.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-mxnet/pull/19944

Reply via email to