aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/GLES_COMPUTE/functions
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-03-15 14:41:34 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commit9e9cbafa9e6cc6b543c89a96d52fc9c5fde04ceb (patch)
treeeb8ae82627c447e530e2745788c371f708c887a5 /arm_compute/runtime/GLES_COMPUTE/functions
parentbe0ae93c50bfa3e588111585025278daa8cb0694 (diff)
downloadComputeLibrary-9e9cbafa9e6cc6b543c89a96d52fc9c5fde04ceb.tar.gz
COMPMID-1004 GLES: Add memory manager to GLES functions
Change-Id: I80fc9c0dd02afd79b501abde751036f9599b7bf2 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/125103 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/runtime/GLES_COMPUTE/functions')
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h4
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h4
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h4
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h6
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h6
5 files changed, 17 insertions, 7 deletions
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h
index e3fa98e6e7..2bac982d0c 100644
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h
+++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h
@@ -33,6 +33,7 @@
#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryGroup.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
#include "arm_compute/runtime/IFunction.h"
@@ -83,7 +84,7 @@ class GCConvolutionLayer : public IFunction
{
public:
/** Default constructor */
- GCConvolutionLayer();
+ GCConvolutionLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
/** Set the input and output tensors.
*
@@ -115,6 +116,7 @@ private:
void configure_mm(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output, bool is_interleaved_transposed = true);
private:
+ GCMemoryGroup _memory_group;
GCConvolutionLayerReshapeWeights _reshape_weights;
GCIm2ColKernel _input_im2col_kernel;
GCGEMMInterleave4x4Kernel _input_interleave_kernel;
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h
index 3ba44f59cb..81be1de21a 100644
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h
+++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h
@@ -28,6 +28,7 @@
#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h"
+#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryGroup.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h"
@@ -63,7 +64,7 @@ class GCFullyConnectedLayer : public IFunction
{
public:
/** Constructor */
- GCFullyConnectedLayer();
+ GCFullyConnectedLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
/** Set the input and output tensors.
*
* @param[in] input Source tensor. Data type supported: F16/F32.
@@ -82,6 +83,7 @@ private:
void configure_fc_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output);
void configure_conv_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output);
+ GCMemoryGroup _memory_group;
GCIm2ColKernel _im2col_kernel;
GCFullyConnectedLayerReshapeWeights _reshape_weights_kernel;
GCGEMMMatrixMultiplyKernel _mm_kernel;
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h
index 8ddfae1169..31ad0abaa0 100644
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h
+++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h
@@ -29,6 +29,7 @@
#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h"
+#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryGroup.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
#include "arm_compute/runtime/IFunction.h"
@@ -48,7 +49,7 @@ class GCGEMM : public IFunction
{
public:
/** Default constructor. */
- GCGEMM();
+ GCGEMM(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
/** Initialise the kernel's inputs and output
*
@@ -73,6 +74,7 @@ public:
void run() override;
private:
+ GCMemoryGroup _memory_group;
GCGEMMInterleave4x4Kernel _interleave_kernel;
GCGEMMTranspose1xWKernel _transpose_kernel;
GCGEMMMatrixMultiplyKernel _mm_kernel;
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h
index d080a2f7b9..adc8157f0e 100644
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h
+++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -29,6 +29,7 @@
#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h"
#include "arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h"
+#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryGroup.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
#include "arm_compute/core/Types.h"
@@ -48,7 +49,7 @@ class GCNormalizationLayer : public IFunction
{
public:
/** Default constructor */
- GCNormalizationLayer();
+ GCNormalizationLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
/** Set the input and output tensors.
*
* @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM],
@@ -62,6 +63,7 @@ public:
void run() override;
private:
+ GCMemoryGroup _memory_group;
GCTensor _squared_input; /**< The intermediate buffer which stores results of squaring input*/
GCNormalizationLayerKernel _norm_kernel; /**< Normalization layer kernel to run */
GCPixelWiseMultiplicationKernel _multiply_kernel; /**< Pixel multiplication kernel to run */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h
index e7f8d5053a..1011c9a2ef 100644
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h
+++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -25,6 +25,7 @@
#define __ARM_COMPUTE_GCSOFTMAXLAYER_H__
#include "arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h"
+#include "arm_compute/runtime/GLES_COMPUTE/GCMemoryGroup.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
#include "arm_compute/runtime/IFunction.h"
@@ -46,7 +47,7 @@ class GCSoftmaxLayer : public IFunction
{
public:
/** Constructor */
- GCSoftmaxLayer();
+ GCSoftmaxLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
/** Set the input and output tensors.
*
* @param[in] input Source tensor. Data types supported: F16/F32
@@ -59,6 +60,7 @@ public:
void run() override;
private:
+ GCMemoryGroup _memory_group;
GCLogits1DMaxKernel _max_kernel;
GCLogits1DShiftExpSumKernel _shift_exp_sum_kernel;
GCLogits1DNormKernel _norm_kernel;