From: Alexander Alekhin Date: Thu, 23 Nov 2017 20:45:44 +0000 (+0000) Subject: dnn(ocl4dnn): drop unused batch_size_ in pooling X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~375^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13f374660fdaa5939db0e19e3fd81c2a49e0fa16;p=platform%2Fupstream%2Fopencv.git dnn(ocl4dnn): drop unused batch_size_ in pooling --- diff --git a/modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp b/modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp index 9e202b4..b137896 100644 --- a/modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp +++ b/modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp @@ -360,7 +360,6 @@ class OCL4DNNPool ocl4dnnPoolingMethod_t pool_method_; int32_t count_; - int32_t batch_size_; int32_t channels_; int32_t kernel_h_; int32_t kernel_w_; diff --git a/modules/dnn/src/ocl4dnn/src/ocl4dnn_pool.cpp b/modules/dnn/src/ocl4dnn/src/ocl4dnn_pool.cpp index 13434d9..759408c 100644 --- a/modules/dnn/src/ocl4dnn/src/ocl4dnn_pool.cpp +++ b/modules/dnn/src/ocl4dnn/src/ocl4dnn_pool.cpp @@ -54,7 +54,6 @@ OCL4DNNPool::OCL4DNNPool(OCL4DNNPoolConfig config) int dims = config.in_shape.size(); int spatial_dims = 2; - batch_size_ = config.in_shape[0]; channels_ = config.channels; pool_method_ = config.pool_method; @@ -124,7 +123,6 @@ bool OCL4DNNPool::Forward(const UMat& bottom, oclk_max_pool_forward.args( count_, ocl::KernelArg::PtrReadOnly(bottom), - batch_size_, channels_, height_, width_, @@ -157,7 +155,6 @@ bool OCL4DNNPool::Forward(const UMat& bottom, oclk_ave_pool_forward.args( count_, ocl::KernelArg::PtrReadOnly(bottom), - batch_size_, channels_, height_, width_, @@ -188,7 +185,6 @@ bool OCL4DNNPool::Forward(const UMat& bottom, oclk_sto_pool_forward.args( count_, ocl::KernelArg::PtrReadOnly(bottom), - batch_size_, channels_, height_, width_, diff --git a/modules/dnn/src/opencl/ocl4dnn_pooling.cl b/modules/dnn/src/opencl/ocl4dnn_pooling.cl index 218b6b4..bb3ba8a 100644 --- a/modules/dnn/src/opencl/ocl4dnn_pooling.cl +++ b/modules/dnn/src/opencl/ocl4dnn_pooling.cl @@ -53,7 +53,7 @@ __kernel void TEMPLATE(max_pool_forward, Dtype) #endif ( - const int nthreads, __global const Dtype* bottom_data, const int num, + const int nthreads, __global const Dtype* bottom_data, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, __global Dtype* top_data @@ -97,7 +97,7 @@ __kernel void #elif defined KERNEL_AVE_POOL __kernel void TEMPLATE(ave_pool_forward, Dtype)( - const int nthreads, __global const Dtype* const bottom_data, const int num, + const int nthreads, __global const Dtype* const bottom_data, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, __global Dtype* top_data) @@ -135,7 +135,7 @@ __kernel void TEMPLATE(ave_pool_forward, Dtype)( #elif defined KERNEL_STO_POOL __kernel void TEMPLATE(sto_pool_forward_test,Dtype)( - const int nthreads, __global const Dtype* const bottom_data, const int num, + const int nthreads, __global const Dtype* const bottom_data, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, __global Dtype* top_data)