ZhennanQin commented on a change in pull request #14056: A better split-2D(SliceChannel) op forward kernel for CPU URL: https://github.com/apache/incubator-mxnet/pull/14056#discussion_r253262122
########## File path: src/operator/channel_op_common.h ########## @@ -101,6 +101,42 @@ void Split(const mshadow::Tensor<xpu, dim, DType> &input, split_helper<xpu, dim, dim-1>(input, output, dimension, req); } } + +template<typename cpu, int dim, typename DType> +void Split_2D(const mshadow::Tensor<cpu, dim, DType> &input, + std::vector<mshadow::Tensor<cpu, dim, DType> > *output, + const int dimension, const std::vector<OpReqType> &req) { + if (dimension != 1) { + LOG(FATAL) << "dimension (" << dimension << ") must == 1"; + } + if (dim != 3) { + LOG(FATAL) << "dimension (" << dim << ") must == 3"; + } else { + std::vector<mshadow::Tensor<cpu, dim, DType> > out = *output; + size_t size = out.size(); + std::vector<int>slice_len; Review comment: Add blank between type and variable. ---------------------------------------------------------------- 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