szha commented on a change in pull request #7931: MKL-DNN integration: request for reviews URL: https://github.com/apache/incubator-mxnet/pull/7931#discussion_r139508448
########## File path: src/operator/activation.cc ########## @@ -29,12 +29,30 @@ #include "./mkl/mkl_memory-inl.h" #include "./mkl/mkl_relu-inl.h" #endif // MXNET_USE_MKL2017 +#if MXNET_USE_MKLDNN == 1 +#include <mkl_memory.h> +#include "./mkl/mkldnn_memory-inl.h" +#include "./mkl/mkldnn_relu-inl.h" +#endif // MXNET_USE_MKLDNN namespace mxnet { namespace op { template<> Operator *CreateOp<cpu>(ActivationParam param, int dtype, const TShape& dshape) { Operator *op = NULL; +#if MXNET_USE_MKLDNN == 1 + if (param.act_type == activation::kReLU) { + switch (dtype) { + case mshadow::kFloat32: + case mshadow::kInt8: + case mshadow::kInt32: + case mshadow::kUint8: + return new MKLDNNReluOp<cpu, float>(); Review comment: Should it be allowed to turn on both MKLDNN and MKL2017? MKLRelu below supports double which isn't supported by mkldnn here. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services