TaoLv commented on a change in pull request #13150: support mkl log when dtype 
is fp32 or fp64
URL: https://github.com/apache/incubator-mxnet/pull/13150#discussion_r240121771
 
 

 ##########
 File path: src/operator/tensor/elemwise_unary_op.h
 ##########
 @@ -348,6 +351,40 @@ class UnaryOp : public OpBase {
       LogUnimplementedOp(attrs, ctx, inputs, req, outputs);
     }
   }
+
+#if MSHADOW_USE_MKL == 1
+#define MKLLOG(fname, DType) \
+static void MKLLog(size_t size, const DType* pIn, DType* pOut) { \
 
 Review comment:
   Macro has the same name with function. Using macro here seems a little bit 
overkill for me. How about: 
   ```
   #if MSHADOW_USE_MKL == 1
   static inline void MKL_Log(int size, const float* pIn, float* pOut) {
     vsLn(size, pIn, pOut);
   }
   
   static inline void MKL_Log(int size, const double* pIn, double* pOut) {
     vdLn(size, pIn, pOut);
   }
   #endif
   ```
   
   Also, please note that `vsLn/vdLn` take `MKL_INT` as the first input. 
`size_t` might overflow.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to