apeforest 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_r259208521
 
 

 ##########
 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) {
 
 Review comment:
   `split()` and `concatenate()` uses `if` branch because there are multiple 
conditions to check. It would be more appropriate to use `CHECK()` here as 
Zhennan suggested.

----------------------------------------------------------------
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