Skip to content

Commit 44369cd

Browse files
committed
fix box_coder kernel name test=develop
1 parent d5704d6 commit 44369cd

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

lite/backends/opencl/cl_kernel/image/box_coder_kernel.cl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -316,18 +316,18 @@ __kernel void encode_center_size(__read_only image2d_t prior_box_image,
316316
output[3]);
317317
}
318318

319-
__kernel void decode_center_size(__read_only image2d_t prior_box_image,
320-
__read_only image2d_t target_box_image,
321-
__write_only image2d_t output_image,
322-
__private const int out_C,
323-
__private const int out_H,
324-
__private const int normalized,
325-
__private const float4 variance
319+
__kernel void decode_center_size_axis0(__read_only image2d_t prior_box_image,
320+
__read_only image2d_t target_box_image,
321+
__write_only image2d_t output_image,
322+
__private const int out_C,
323+
__private const int out_H,
324+
__private const int normalized,
325+
__private const float4 variance
326326
#ifdef PRIOR_BOX_VAR
327-
,
328-
__read_only image2d_t prior_box_var_image
327+
,
328+
__read_only image2d_t prior_box_var_image
329329
#endif
330-
) {
330+
) {
331331
const int out_c = get_global_id(0);
332332
const int out_nh = get_global_id(1);
333333
const int out_h = out_nh % out_H;

lite/kernels/opencl/box_coder_image_compute.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BoxCoderComputeImage : public KernelLite<TARGET(kOpenCL),
4343
boxcoder_param_ = param_.get_mutable<param_t>();
4444
if (boxcoder_param_->code_type == "decode_center_size" &&
4545
boxcoder_param_->axis == 0) {
46-
kernel_func_name_ = "decode_center_size";
46+
kernel_func_name_ = "decode_center_size_axis0";
4747
} else if (boxcoder_param_->code_type == "decode_center_size" &&
4848
boxcoder_param_->axis == 1) {
4949
kernel_func_name_ = "decode_center_size_axis1";

lite/tests/unittest_py/op/test_box_coder_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def generate_targetbox(*args, **kwargs):
135135
def sample_predictor_configs(self):
136136
# code_type = "encode_center_size", abs_error = 1e-4. out = out /variance
137137
# code_type = "decode_center_size", abs_error=1e-5.
138-
return self.get_predictor_configs(), ["box_coder"], (1e-3, 1e-3)
138+
return self.get_predictor_configs(), ["box_coder"], (1e-4, 2e-4)
139139

140140
def add_ignore_pass_case(self):
141141
pass

0 commit comments

Comments
 (0)