diff --git a/lite/backends/opencl/cl_kernel/image/conv2d_3x3_opt_kernel.cl b/lite/backends/opencl/cl_kernel/image/conv2d_3x3_opt_kernel.cl index a9d3d4d44ae9a736a9fe648d3e6d4078fb890bd7..468dd1a8a30ca572d76ed0e20acf59e6906e0e1c 100644 --- a/lite/backends/opencl/cl_kernel/image/conv2d_3x3_opt_kernel.cl +++ b/lite/backends/opencl/cl_kernel/image/conv2d_3x3_opt_kernel.cl @@ -14,23 +14,23 @@ limitations under the License. */ #include -__kernel void conv2d_3x3(__private const int item_ch, - __private const int item_w, - __private const int item_h, - __read_only image2d_t input_image, - __read_only image2d_t filter_image, +__kernel void conv2d_3x3_opt(__private const int item_ch, + __private const int item_w, + __private const int item_h, + __read_only image2d_t input_image, + __read_only image2d_t filter_image, #if defined(BIASE_CH) || defined(BIASE_ELE) - __read_only image2d_t bias, + __read_only image2d_t bias, #endif - __write_only image2d_t output_image, - __private const int stride, - __private const int pad, - __private const int dilation, - __private const int in_ch, - __private const int in_w, - __private const int in_h, - __private const int out_w, - __private const int out_h) { + __write_only image2d_t output_image, + __private const int stride, + __private const int pad, + __private const int dilation, + __private const int in_ch, + __private const int in_w, + __private const int in_h, + __private const int out_w, + __private const int out_h) { const sampler_t sampler = CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST; diff --git a/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc b/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc index 0d09c6e928105dd064f1cf8c4953212d5f63b152..3eaf63e7f9be80cf36c475476c644516bbc75fbd 100644 --- a/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc +++ b/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc @@ -31,7 +31,7 @@ int64_t ShapeProduction(const shape_t& shape) { std::string ShapePrint(const shape_t& shape) { std::string shape_str{""}; for (auto i : shape) { - shape_str = shape_str + std::to_string(i) + " "; + shape_str += std::to_string(i) + " "; } return shape_str; } @@ -153,9 +153,9 @@ int main(int argc, char** argv) { std::string model_dir = argv[1]; if (argc >= 9) { input_shape[0] = atoi(argv[2]); - input_shape[1] = atoi(argv[4]); - input_shape[2] = atoi(argv[5]); - input_shape[3] = atoi(argv[6]); + input_shape[1] = atoi(argv[3]); + input_shape[2] = atoi(argv[4]); + input_shape[3] = atoi(argv[5]); repeats = atoi(argv[6]); warmup = atoi(argv[7]); print_output_elem = atoi(argv[8]); diff --git a/lite/kernels/opencl/conv_image_compute.cc b/lite/kernels/opencl/conv_image_compute.cc index 859db34f0c8d2d5727c6bfdc4c28633aa0a19bbb..04692d9d75c650a7a9ac41a24e21e036e17f8d46 100644 --- a/lite/kernels/opencl/conv_image_compute.cc +++ b/lite/kernels/opencl/conv_image_compute.cc @@ -98,7 +98,7 @@ void ConvImageCompute::PrepareForRun() { filter_image_dims[0], filter_image_dims[1], filter_image_v.data()); impl_ = &ConvImageCompute::Conv2d1x1; -// # define DEPTH_CONV_USE_SPL +// #define DEPTH_CONV_USE_SPL #ifdef DEPTH_CONV_USE_SPL } else if (filter_dims[1] == 1 && x_dims[1] == output_dims[1] && kernel_h == 3 && kernel_w == 3 && groups > 1) { @@ -142,7 +142,7 @@ void ConvImageCompute::PrepareForRun() { impl_ = &ConvImageCompute::DepthwiseConv2d; } else if (kernel_h == 3 && kernel_h == 3) { // conv2d_3x3 - kernel_func_names_.push_back("conv2d_3x3"); + kernel_func_names_.push_back("conv2d_3x3_opt"); kernel_func_paths_.push_back("image/conv2d_3x3_opt_kernel.cl"); CLImageConverterFolder converter; diff --git a/lite/kernels/opencl/elementwise_add_buffer_compute_test.cc b/lite/kernels/opencl/elementwise_add_buffer_compute_test.cc index 06f946bca77f2bc43493d2bb7d86d134a030eac5..67b56c747757499574bf5e9ac7535a366ce343da 100644 --- a/lite/kernels/opencl/elementwise_add_buffer_compute_test.cc +++ b/lite/kernels/opencl/elementwise_add_buffer_compute_test.cc @@ -87,7 +87,7 @@ void elementwise_compute_ref(const dtype *x_data, } } } else { - LOG(FATAL) << "unsupported Elementwise type: " << elt_type << std::endl; + LOG(FATAL) << "unsupported Elementwise type: " << elt_type; } } diff --git a/lite/kernels/opencl/elementwise_add_image_compute_test.cc b/lite/kernels/opencl/elementwise_add_image_compute_test.cc index ecc9e789c4b64be238535d912f5e3ba0d69bce8b..c7fb0b07b25007df155e96411342af69f8b885d3 100644 --- a/lite/kernels/opencl/elementwise_add_image_compute_test.cc +++ b/lite/kernels/opencl/elementwise_add_image_compute_test.cc @@ -87,7 +87,7 @@ void elementwise_compute_ref(const dtype *x_data, } } } else { - LOG(FATAL) << "unsupported Elementwise type: " << elt_type << std::endl; + LOG(FATAL) << "unsupported Elementwise type: " << elt_type; } } diff --git a/lite/kernels/opencl/elementwise_mul_image_compute_test.cc b/lite/kernels/opencl/elementwise_mul_image_compute_test.cc index 06d0d4f7b4b4cf2ede365c81e4138a616c8dd9dc..cb63f333e6e061984be33ab6063424c941778751 100644 --- a/lite/kernels/opencl/elementwise_mul_image_compute_test.cc +++ b/lite/kernels/opencl/elementwise_mul_image_compute_test.cc @@ -106,7 +106,7 @@ void elementwise_compute_ref(const dtype *x_data, out_data[x] = x_data[x] * y_data[y]; } } else { - LOG(FATAL) << "unsupported Elementwise type: " << elt_type << std::endl; + LOG(FATAL) << "unsupported Elementwise type: " << elt_type; } } diff --git a/lite/kernels/opencl/elementwise_sub_image_compute_test.cc b/lite/kernels/opencl/elementwise_sub_image_compute_test.cc index 0593747547eb6b41a4b023fa92b9219ae0b591b0..61a7aa4447803ff2140f5cc5c9a40ea943f211af 100644 --- a/lite/kernels/opencl/elementwise_sub_image_compute_test.cc +++ b/lite/kernels/opencl/elementwise_sub_image_compute_test.cc @@ -87,7 +87,7 @@ void elementwise_compute_ref(const dtype *x_data, } } } else { - LOG(FATAL) << "unsupported Elementwise type: " << elt_type << std::endl; + LOG(FATAL) << "unsupported Elementwise type: " << elt_type; } } diff --git a/lite/kernels/opencl/grid_sampler_image_compute_test.cc b/lite/kernels/opencl/grid_sampler_image_compute_test.cc index afdebc0e64f3503a95bd14f00207920ed6363cf5..5851950bec3edc67b879fad589ce6dcafbbdceeb 100644 --- a/lite/kernels/opencl/grid_sampler_image_compute_test.cc +++ b/lite/kernels/opencl/grid_sampler_image_compute_test.cc @@ -224,7 +224,7 @@ TEST(grid_samler_image2d, compute) { #ifdef GRID_FP16_PRINT_RESULT LOG(INFO) << "---- print kernel result (input -> output) ----"; for (int eidx = 0; eidx < in_dim.production(); ++eidx) { - std::cout << input_v[eidx] << " -> " << out_data[eidx] << std::endl; + std::cout << input_v[eidx] << " -> " << out_data[eidx] << "\n"; } #endif // GRID_FP16_PRINT_RESULT for (int i = 0; i < out_dim.production(); i++) {