anko-intel commented on a change in pull request #20356:
URL: https://github.com/apache/incubator-mxnet/pull/20356#discussion_r659855870
##########
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:
I have noticed that alignment is still lost here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]