aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/GLES_COMPUTE
diff options
context:
space:
mode:
authorFrank Lei <frank.lei@arm.com>2018-02-01 14:47:14 +0800
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:40 +0000
commit4406fd6cc4abded564d3791324e1f48bdfd34273 (patch)
tree22fe402fe9ac7ca338df49e9eccd6eb1587ae875 /arm_compute/core/GLES_COMPUTE
parent898d399a0f62c15612a52df4bff5018e783214e4 (diff)
downloadComputeLibrary-4406fd6cc4abded564d3791324e1f48bdfd34273.tar.gz
APPBROWSER-391: Fix GLES COMPUTE alignment issues
APPBROWSER-402: Performance optimization for squeezenet/xray model Change-Id: If31b186b99a6d6087164019fe94d3ac9279e3204 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/119526 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/GLES_COMPUTE')
-rw-r--r--arm_compute/core/GLES_COMPUTE/IGCTensor.h15
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h3
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h7
-rw-r--r--arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h1
4 files changed, 21 insertions, 5 deletions
diff --git a/arm_compute/core/GLES_COMPUTE/IGCTensor.h b/arm_compute/core/GLES_COMPUTE/IGCTensor.h
index ab4e57e0ce..7329864b85 100644
--- a/arm_compute/core/GLES_COMPUTE/IGCTensor.h
+++ b/arm_compute/core/GLES_COMPUTE/IGCTensor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -75,6 +75,18 @@ public:
*/
virtual GLuint gc_buffer() const = 0;
+ /** Flag indicating whether the tensor has been left aligned by a kernel and therefore needs shifting.
+ *
+ * @return True if the tensor is left aligned.
+ */
+ bool needs_shifting() const;
+ /** Set the flag indicating whether or not a tensor needs shifting.
+ *
+ * @param[in] needs_shifting Indicates if the tensor is left aligned or not.
+ *
+ */
+ void set_needs_shifting(bool needs_shifting);
+
protected:
/** Method to be implemented by the child class to map the SSBO.
*
@@ -92,6 +104,7 @@ protected:
private:
uint8_t *_mapping;
+ bool _needs_shifting;
};
using IGCImage = IGCTensor;
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h
index ce220cc564..06a54dd0b3 100644
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h
+++ b/arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -71,6 +71,7 @@ private:
IGCTensor *_output;
int _top_bottom;
int _left_right;
+ int _depth_offset;
};
}
#endif /* __ARM_COMPUTE_GCDEPTHCONCATENATEKERNEL_H__ */
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h
index 3f936f6cb9..bdbc50c735 100644
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h
+++ b/arm_compute/core/GLES_COMPUTE/kernels/GCScaleKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,7 +24,7 @@
#ifndef __ARM_COMPUTE_GCSCALEKERNEL_H__
#define __ARM_COMPUTE_GCSCALEKERNEL_H__
-#include "arm_compute/core/GLES_COMPUTE/IGCSimple2DKernel.h"
+#include "arm_compute/core/GLES_COMPUTE/IGCSimple3DKernel.h"
#include "arm_compute/core/Types.h"
namespace arm_compute
@@ -32,7 +32,7 @@ namespace arm_compute
class IGCTensor;
/** Interface for the scale kernel */
-class GCScaleKernel : public IGCSimple2DKernel
+class GCScaleKernel : public IGCSimple3DKernel
{
public:
/** Initialise the kernel's inputs, output and interpolation policy
@@ -47,6 +47,7 @@ public:
void configure(const IGCTensor *input, IGCTensor *output, InterpolationPolicy policy, bool border_undefined, SamplingPolicy sampling_policy = SamplingPolicy::CENTER);
// Inherited methods overridden:
+ void run(const Window &window) override;
BorderSize border_size() const override;
};
} // namespace arm_compute
diff --git a/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h b/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h
index 5f108764b4..452caae146 100644
--- a/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h
+++ b/arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h
@@ -78,6 +78,7 @@ public:
private:
IGCTensor *_input;
gles::NDRange _lws;
+ int _left_padding;
};
}
#endif /*__ARM_COMPUTE_GCTENSORSHIFTKERNEL_H__ */