Skip to content

Commit 13f3746

Browse files
committed
dnn(ocl4dnn): drop unused batch_size_ in pooling
1 parent e34b64c commit 13f3746

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ class OCL4DNNPool
360360

361361
ocl4dnnPoolingMethod_t pool_method_;
362362
int32_t count_;
363-
int32_t batch_size_;
364363
int32_t channels_;
365364
int32_t kernel_h_;
366365
int32_t kernel_w_;

modules/dnn/src/ocl4dnn/src/ocl4dnn_pool.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ OCL4DNNPool<Dtype>::OCL4DNNPool(OCL4DNNPoolConfig config)
5454
int dims = config.in_shape.size();
5555
int spatial_dims = 2;
5656

57-
batch_size_ = config.in_shape[0];
5857
channels_ = config.channels;
5958
pool_method_ = config.pool_method;
6059

@@ -124,7 +123,6 @@ bool OCL4DNNPool<Dtype>::Forward(const UMat& bottom,
124123
oclk_max_pool_forward.args(
125124
count_,
126125
ocl::KernelArg::PtrReadOnly(bottom),
127-
batch_size_,
128126
channels_,
129127
height_,
130128
width_,
@@ -157,7 +155,6 @@ bool OCL4DNNPool<Dtype>::Forward(const UMat& bottom,
157155
oclk_ave_pool_forward.args(
158156
count_,
159157
ocl::KernelArg::PtrReadOnly(bottom),
160-
batch_size_,
161158
channels_,
162159
height_,
163160
width_,
@@ -188,7 +185,6 @@ bool OCL4DNNPool<Dtype>::Forward(const UMat& bottom,
188185
oclk_sto_pool_forward.args(
189186
count_,
190187
ocl::KernelArg::PtrReadOnly(bottom),
191-
batch_size_,
192188
channels_,
193189
height_,
194190
width_,

modules/dnn/src/opencl/ocl4dnn_pooling.cl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ __kernel void
5353
TEMPLATE(max_pool_forward, Dtype)
5454
#endif
5555
(
56-
const int nthreads, __global const Dtype* bottom_data, const int num,
56+
const int nthreads, __global const Dtype* bottom_data,
5757
const int channels, const int height, const int width,
5858
const int pooled_height, const int pooled_width,
5959
__global Dtype* top_data
@@ -97,7 +97,7 @@ __kernel void
9797
#elif defined KERNEL_AVE_POOL
9898

9999
__kernel void TEMPLATE(ave_pool_forward, Dtype)(
100-
const int nthreads, __global const Dtype* const bottom_data, const int num,
100+
const int nthreads, __global const Dtype* const bottom_data,
101101
const int channels, const int height, const int width,
102102
const int pooled_height, const int pooled_width,
103103
__global Dtype* top_data)
@@ -135,7 +135,7 @@ __kernel void TEMPLATE(ave_pool_forward, Dtype)(
135135
#elif defined KERNEL_STO_POOL
136136

137137
__kernel void TEMPLATE(sto_pool_forward_test,Dtype)(
138-
const int nthreads, __global const Dtype* const bottom_data, const int num,
138+
const int nthreads, __global const Dtype* const bottom_data,
139139
const int channels, const int height, const int width,
140140
const int pooled_height, const int pooled_width,
141141
__global Dtype* top_data)

0 commit comments

Comments
 (0)