piiswrong commented on a change in pull request #8566: optimize broadcast
URL: https://github.com/apache/incubator-mxnet/pull/8566#discussion_r150332277
 
 

 ##########
 File path: src/operator/mxnet_op.h
 ##########
 @@ -345,6 +394,13 @@ __global__ void mxnet_generic_kernel(int N, Args... args) 
{
   }
 }
 
+template<typename OP, typename ...Args>
+__global__ void mxnet_generic_kernel_ex(int N, Args... args) {
+  for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * 
gridDim.x) {
+    OP::Map(i, 1, args...);
 
 Review comment:
   For GPU the fastest way is to add a step. Each thread work on N elements 
separated by step

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

Reply via email to