if (::internal::arm_compute::isGpuMode())
{
- if (getHeight(ker_alloc) == 3 && getWidth(ker_alloc) == 3)
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::CLDepthwiseConvolutionLayer3x3>();
- fn->configure(CAST_CL(ifm_alloc), CAST_CL(ker_alloc), CAST_CL(bias_alloc),
- CAST_CL(ofm_alloc), conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
- else
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::CLDepthwiseConvolutionLayer>();
- fn->configure(CAST_CL(ifm_alloc), CAST_CL(ker_alloc), CAST_CL(bias_alloc),
- CAST_CL(ofm_alloc), conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
+ auto fn = nnfw::cpp14::make_unique<::arm_compute::CLDepthwiseConvolutionLayer>();
+
+ fn->configure(CAST_CL(ifm_alloc), CAST_CL(ker_alloc), CAST_CL(bias_alloc), CAST_CL(ofm_alloc),
+ conv_info, param.multipler);
+
+ builder.append("DepthwiseConv2D", std::move(fn));
}
else
{
- if (getHeight(ker_alloc) == 3 && getWidth(ker_alloc) == 3)
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::NEDepthwiseConvolutionLayer3x3>();
- fn->configure(ifm_alloc, ker_alloc, bias_alloc, ofm_alloc, conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
- else
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::NEDepthwiseConvolutionLayer>();
- fn->configure(ifm_alloc, ker_alloc, bias_alloc, ofm_alloc, conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
+ auto fn = nnfw::cpp14::make_unique<::arm_compute::NEDepthwiseConvolutionLayer>();
+
+ fn->configure(ifm_alloc, ker_alloc, bias_alloc, ofm_alloc, conv_info, param.multipler);
+
+ builder.append("DepthwiseConv2D", std::move(fn));
}
ActivationBuilder{builder}.append(param.activation, ofm_alloc);
if (::internal::arm_compute::isGpuMode())
{
- if (getHeight(ker_alloc) == 3 && getWidth(ker_alloc) == 3)
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::CLDepthwiseConvolutionLayer3x3>();
- fn->configure(CAST_CL(ifm_alloc), CAST_CL(ker_alloc), CAST_CL(bias_alloc),
- CAST_CL(ofm_alloc), conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
- else
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::CLDepthwiseConvolutionLayer>();
- fn->configure(CAST_CL(ifm_alloc), CAST_CL(ker_alloc), CAST_CL(bias_alloc),
- CAST_CL(ofm_alloc), conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
+ auto fn = nnfw::cpp14::make_unique<::arm_compute::CLDepthwiseConvolutionLayer>();
+
+ fn->configure(CAST_CL(ifm_alloc), CAST_CL(ker_alloc), CAST_CL(bias_alloc), CAST_CL(ofm_alloc),
+ conv_info, param.multipler);
+
+ builder.append("DepthwiseConv2D", std::move(fn));
}
else
{
- if (getHeight(ker_alloc) == 3 && getWidth(ker_alloc) == 3)
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::NEDepthwiseConvolutionLayer3x3>();
- fn->configure(ifm_alloc, ker_alloc, bias_alloc, ofm_alloc, conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
- else
- {
- auto fn = nnfw::cpp14::make_unique<::arm_compute::NEDepthwiseConvolutionLayer>();
- fn->configure(ifm_alloc, ker_alloc, bias_alloc, ofm_alloc, conv_info, param.multipler);
- builder.append("DepthwiseConv2D", std::move(fn));
- }
+ auto fn = nnfw::cpp14::make_unique<::arm_compute::NEDepthwiseConvolutionLayer>();
+
+ fn->configure(ifm_alloc, ker_alloc, bias_alloc, ofm_alloc, conv_info, param.multipler);
+
+ builder.append("DepthwiseConv2D", std::move(fn));
}
ActivationBuilder{builder}.append(param.activation, ofm_alloc);