aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/GLES_COMPUTE
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/GLES_COMPUTE')
-rw-r--r--src/runtime/GLES_COMPUTE/GCScheduler.cpp9
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp4
-rw-r--r--src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp8
3 files changed, 17 insertions, 4 deletions
diff --git a/src/runtime/GLES_COMPUTE/GCScheduler.cpp b/src/runtime/GLES_COMPUTE/GCScheduler.cpp
index fcc855957f..f7812730fc 100644
--- a/src/runtime/GLES_COMPUTE/GCScheduler.cpp
+++ b/src/runtime/GLES_COMPUTE/GCScheduler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
+#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h"
#include "arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h"
using namespace arm_compute;
@@ -31,7 +32,7 @@ using namespace arm_compute;
std::once_flag GCScheduler::_initialize_symbols;
GCScheduler::GCScheduler()
- : _display(EGL_NO_DISPLAY), _context(EGL_NO_CONTEXT)
+ : _display(EGL_NO_DISPLAY), _context(EGL_NO_CONTEXT), _target(GPUTarget::MIDGARD)
{
}
@@ -48,11 +49,13 @@ void GCScheduler::default_init()
{
setup_context();
- GCKernelLibrary::get().init("./cs_shaders/", _display, _context);
+ init(_display, _context);
}
void GCScheduler::init(EGLDisplay dpy, EGLContext ctx)
{
+ _target = get_target_from_device();
+
GCKernelLibrary::get().init("./cs_shaders/", dpy, ctx);
}
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