wkcn commented on a change in pull request #16292: [Done] BilinearResize2D 
optimized
URL: https://github.com/apache/incubator-mxnet/pull/16292#discussion_r333845093
 
 

 ##########
 File path: src/operator/contrib/bilinear_resize-inl.cuh
 ##########
 @@ -60,19 +60,63 @@ static unsigned getNumThreads(int nElem, const bool 
smaller) {
   return smaller ? (MAX_BLOCK_SIZE >> 1) : MAX_BLOCK_SIZE;
 }
 
-// caffe_gpu_interp2_kernel overloading with Tensor<xpu, 3, DType>
+__device__ __forceinline__ size_t
+idx(const size_t nc,
+  const size_t height,
+  const size_t width,
+  const size_t y,
+  const size_t x) {
+  return (nc * height + y) * width + x;
+}
+
+template <typename Acctype>
+__host__ MSHADOW_XINLINE static Acctype cu_area_pixel_compute_scale(
 
 Review comment:
   `__forceinline__` is the same as `__forceinline`, which declares that the 
CUDA function should be inline.
   The order doesn't affect the meaning.
   `MSHADOW_XINLINE` is used to write the code which support both CPU and GPU, 
e.g. MSHADOW Kernel.
   Simplify, it is also available to remove `MSHADOW_XINLINE` in this file : )

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