diff options
author | Gian Marco <gianmarco.iodice@arm.com> | 2018-02-22 15:28:44 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:47:40 +0000 |
commit | 3502613ec7223a415c6f648d8e0b54d387e00d7d (patch) | |
tree | 291f5414a59586c7c4bb99423b21545400c2bfd9 /src | |
parent | ce876123707373f9a428f43df9d244f1de2c0cbf (diff) | |
download | ComputeLibrary-3502613ec7223a415c6f648d8e0b54d387e00d7d.tar.gz |
COMPMID-765 - Fix performance issues on OpenCL
The problem was related to the reshape of the weights. The reshaping
happened for each run
Change-Id: Ie7d02fa6bb08df34e44213303e9eb0700ff77160
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/121877
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp b/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp index 23c3050476..3cba98ce0e 100644 --- a/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp @@ -95,7 +95,7 @@ void CLConvolutionLayerReshapeWeights::run() CLGEMMConvolutionLayer::CLGEMMConvolutionLayer(std::shared_ptr<IMemoryManager> memory_manager) : _memory_group(memory_manager), _reshape_weights(), _im2col_kernel(), _mm_gemm(memory_manager), _mm_gemmlowp(memory_manager), _gemmlowp_output_stage(), _col2im_kernel(), _im2col_output(), - _interleave_output(), _weights_reshaped(), _weights_transposed(), _gemm_output(), _tmp_output(), _is_quantized(false) + _interleave_output(), _weights_reshaped(), _weights_transposed(), _gemm_output(), _tmp_output(), _is_quantized(false), _is_first_run(true) { } @@ -349,7 +349,12 @@ Status CLGEMMConvolutionLayer::validate(const ITensorInfo *input, const ITensorI void CLGEMMConvolutionLayer::run() { // Run weights reshaping (Runs once for every configure) - _reshape_weights.run(); + if(_is_first_run) + { + _reshape_weights.run(); + + _is_first_run = false; + } _memory_group.acquire(); |