COMPMID-477 - Optimized Direct Convolution 3x3 and 5x5 (f32) for Bifrost.
Each work-item computes 4x3 output elements in case of 3x3 convolution and 4x2 in case of 5x5 convolution
Change-Id: I6ebbaff8b7e971c1f90d5845c0b58d2a40f39df5
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/84345
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
diff --git a/src/runtime/CL/functions/CLDirectConvolutionLayer.cpp b/src/runtime/CL/functions/CLDirectConvolutionLayer.cpp
index 65be417..6fafd9c 100644
--- a/src/runtime/CL/functions/CLDirectConvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLDirectConvolutionLayer.cpp
@@ -38,13 +38,21 @@
void CLDirectConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info)
{
+ // Set GPU target
+ _direct_conv_kernel.set_target(CLScheduler::get().target());
+
+ // Configure direct convolution
_direct_conv_kernel.configure(input, weights, biases, output, conv_info);
+ // Configure border handler
_input_border_handler.configure(input, _direct_conv_kernel.border_size(), BorderMode::CONSTANT, PixelValue(0));
}
void CLDirectConvolutionLayer::run()
{
+ // Run border handler
CLScheduler::get().enqueue(_input_border_handler, false);
+
+ // Run direct convolution
CLScheduler::get().enqueue(_direct_conv_kernel);
}