diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-04-25 11:58:07 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:51:50 +0000 |
commit | b8fc60fc9fe9ad6c48d9618fc65753fbe5813216 (patch) | |
tree | a9f271d73f573686ba29c724bb3a3cee4b6b203b /src/runtime/GLES_COMPUTE/functions | |
parent | 62385bce6baacfa194cff9e6be6d8eaa73bc3fab (diff) | |
download | ComputeLibrary-b8fc60fc9fe9ad6c48d9618fc65753fbe5813216.tar.gz |
COMPMID-1086: Optimizing GCGEMM - Add helpers to get target GPU information
This patch moves some of the helper functions in CLHelpers.[h,cpp] to
GPUTarget.[h,cpp] in order to make them avaialable to both CL and GLES backends.
Change-Id: Ib89b05a2084b73eb643b32fac13b8367cc80b6a5
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/128988
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/runtime/GLES_COMPUTE/functions')
-rw-r--r-- | src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp | 4 | ||||
-rw-r--r-- | src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp index dc73eb85e6..d1ef87d32c 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp @@ -109,6 +109,10 @@ void GCConvolutionLayer::configure(const IGCTensor *input, const IGCTensor *weig const DataType dt = input->info()->data_type(); + // Set the GPU target for im2col and col2im + _input_im2col_kernel.set_target(GCScheduler::get().get_target()); + _output_col2im_kernel.set_target(GCScheduler::get().get_target()); + const bool append_bias = (biases != nullptr); const unsigned bias_element = (append_bias) ? 1 : 0; const IGCTensor *biases_to_use = (append_bias) ? biases : nullptr; diff --git a/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp b/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp index 0a75a38c50..79f8f71713 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp @@ -38,7 +38,6 @@ #include "arm_compute/runtime/ITensorAllocator.h" using namespace arm_compute; -using namespace arm_compute::gles_compute; namespace { @@ -92,6 +91,13 @@ void GCGEMM::configure(const IGCTensor *a, const IGCTensor *b, const IGCTensor * const IGCTensor *matrix_a = a; const IGCTensor *matrix_b = b; + // Get the GPU target + const GPUTarget gpu_target = GCScheduler::get().get_target(); + + // Set the target for the kernels + _interleave_kernel.set_target(gpu_target); + _mm_kernel.set_target(gpu_target); + // Arguments used by GEMMReshapeInfo // If we pass the matrix A and matrix B reshaped to GCGEMMMatrixMultiplyKernel, we need to pass m, n, k, mult_transpose1xW_width and mult_interleave4x4_height to GCGEMMReshapeInfo // in order to know how the matrices have been reshaped |