ptrendx commented on a change in pull request #16039: FullyConnected Bias 
performance improvement on GPU
URL: https://github.com/apache/incubator-mxnet/pull/16039#discussion_r327784099
 
 

 ##########
 File path: src/operator/nn/fully_connected-inl.h
 ##########
 @@ -272,20 +284,26 @@ void AddBiasGrad(const TBlob& in_grad,
   int ltype = mxnet::common::cuda::get_load_type(N * sizeof(DType));
   const int M = grad_blob.shape_.Size() / N;
   MXNET_LOAD_TYPE_SWITCH(ltype, LType, {
-    const unsigned int blocks_x = (N * sizeof(DType) + 32 * sizeof(LType) - 1) 
/
-                                  (32 * sizeof(LType));
+    const unsigned int blocks_x = ceil_div(N * sizeof(DType), 32 * 
sizeof(LType));
 
 Review comment:
   ok

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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