zhreshold commented on a change in pull request #14139: Performance improvement 
in Normalize GPU Kernel
URL: https://github.com/apache/incubator-mxnet/pull/14139#discussion_r256639710
 
 

 ##########
 File path: src/operator/image/image_random.cu
 ##########
 @@ -99,18 +111,134 @@ void ToTensorImplCUDA(mshadow::Stream<gpu> *s,
         W = input.size(2);
         C = input.size(3);
         blocks = N > 0 ? N : 1;
-        blocks = N;
     }
-    // One block per image.
-    // Number of threads = (32, 32) is optimal, because,
-    // computation is minimal and overhead of CUDA preparing
-    // all threads is minimal.
+
     ToTensorCudaKernel<gpu, DType>
-            <<<blocks, dim3(32, 32), 0, stream>>>(input, output,
+            <<<blocks, dim3(H, cuda::kMaxThreadsPerBlock / H), 0, 
stream>>>(input, output,
 
 Review comment:
   please fix ToTensor similarly in a separate PR.

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