You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/06/30 11:12:41 UTC

[GitHub] [incubator-mxnet] mozga-intel commented on a change in pull request #20356: Auto-formatter to keep the same coding style

mozga-intel commented on a change in pull request #20356:
URL: https://github.com/apache/incubator-mxnet/pull/20356#discussion_r661361120



##########
File path: src/operator/nn/mkldnn/mkldnn_batch_norm-inl.h
##########
@@ -27,69 +27,72 @@
 #define MXNET_OPERATOR_NN_MKLDNN_MKLDNN_BATCH_NORM_INL_H_
 
 #if MXNET_USE_MKLDNN == 1
-#include <vector>
-#include <utility>
 #include <mkldnn.hpp>
+#include <utility>
+#include <vector>
 #include "../batch_norm-inl.h"
-#include "./mkldnn_ops-inl.h"
 #include "./mkldnn_base-inl.h"
+#include "./mkldnn_ops-inl.h"
 
-#define VARIANCE_TO_INVSTD(__var$,    __eps$)   (1.0/std::sqrt((__var$) + DType(__eps$)))
-#define INVSTD_TO_VARIANCE(__invstd$, __eps$)   ((1.0 / ((__invstd$) * (__invstd$))) - (__eps$))
+#define VARIANCE_TO_INVSTD(__var$, __eps$) \
+  (1.0 / std::sqrt((__var$) + DType(__eps$)))
+#define INVSTD_TO_VARIANCE(__invstd$, __eps$) \
+  ((1.0 / ((__invstd$) * (__invstd$))) - (__eps$))
 namespace mxnet {
 namespace op {
 
-typedef mkldnn::batch_normalization_forward::primitive_desc     t_bn_f_pdesc;
-typedef mkldnn::batch_normalization_forward::desc               t_bn_f_desc;
-typedef mkldnn::batch_normalization_backward::primitive_desc    t_bn_b_pdesc;
-typedef mkldnn::batch_normalization_backward::desc              t_bn_b_desc;
+typedef mkldnn::batch_normalization_forward::primitive_desc t_bn_f_pdesc;

Review comment:
       There's a special param that setting it up. Unfortunately, it doesn't match our requirements in some cases. A preferable case is keeping the name of a variable anchored to a type rather than putting variables one by one. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org