ptrendx commented on a change in pull request #16355: Embedding gradient 
operator on GPU
URL: https://github.com/apache/incubator-mxnet/pull/16355#discussion_r330682129
 
 

 ##########
 File path: src/operator/tensor/indexing_op.cu
 ##########
 @@ -545,6 +545,245 @@ void TakeOpForward<gpu>(const nnvm::NodeAttrs& attrs,
   });
 }
 
+/*
+ * \brief returns integer log2(a) rounded up
+ */
+inline int ilog2(unsigned int a) {
+  int k = 1;
+  while (a >>= 1) k++;
+  return k;
+}
 
 Review comment:
   Please move this function to unnamed namespace.

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