aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-05-21 13:32:43 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-06-03 14:51:29 +0000
commit4c5469b192665c94118a8a558787cb9cec2d0765 (patch)
tree168aa969de8243bdbb1f25247dd9f54d037ae32c /arm_compute/runtime
parent43a129e94df41f9ac8bc78b702da5a387ada0494 (diff)
downloadComputeLibrary-4c5469b192665c94118a8a558787cb9cec2d0765.tar.gz
COMPMID-2225: Add interface support for new quantized data types.
Add support for: -QSYMM8, 8-bit quantized symmetric -QSYMM8_PER_CHANNEL, 8-bit quantized symmetric with per channel quantization Change-Id: I00c4ff98e44af37419470af61419ee95d0de2463 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/1236 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime')
-rw-r--r--arm_compute/runtime/CL/CLSubTensor.h3
-rw-r--r--arm_compute/runtime/CL/CLTensor.h4
-rw-r--r--arm_compute/runtime/CL/CLTensorAllocator.h9
-rw-r--r--arm_compute/runtime/CL/CLTunerTypes.h1
-rw-r--r--arm_compute/runtime/ITensorAllocator.h4
5 files changed, 17 insertions, 4 deletions
diff --git a/arm_compute/runtime/CL/CLSubTensor.h b/arm_compute/runtime/CL/CLSubTensor.h
index 9c37f8be7c..1625aa5cb6 100644
--- a/arm_compute/runtime/CL/CLSubTensor.h
+++ b/arm_compute/runtime/CL/CLSubTensor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -88,6 +88,7 @@ public:
ITensorInfo *info() const override;
ITensorInfo *info() override;
const cl::Buffer &cl_buffer() const override;
+ CLQuantization quantization() const override;
protected:
// Inherited methods overridden:
diff --git a/arm_compute/runtime/CL/CLTensor.h b/arm_compute/runtime/CL/CLTensor.h
index c47d2be1b0..65ff4f2bba 100644
--- a/arm_compute/runtime/CL/CLTensor.h
+++ b/arm_compute/runtime/CL/CLTensor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -32,6 +32,7 @@
namespace arm_compute
{
+// Forward declarations
class ITensorAllocator;
class ITensorInfo;
@@ -66,6 +67,7 @@ public:
TensorInfo *info() const override;
TensorInfo *info() override;
const cl::Buffer &cl_buffer() const override;
+ CLQuantization quantization() const override;
protected:
// Inherited methods overridden:
diff --git a/arm_compute/runtime/CL/CLTensorAllocator.h b/arm_compute/runtime/CL/CLTensorAllocator.h
index 302bd6d52a..f942478ada 100644
--- a/arm_compute/runtime/CL/CLTensorAllocator.h
+++ b/arm_compute/runtime/CL/CLTensorAllocator.h
@@ -24,9 +24,11 @@
#ifndef __ARM_COMPUTE_CLTENSORALLOCATOR_H__
#define __ARM_COMPUTE_CLTENSORALLOCATOR_H__
+#include "arm_compute/runtime/CL/CLArray.h"
#include "arm_compute/runtime/CL/CLMemory.h"
#include "arm_compute/runtime/ITensorAllocator.h"
+#include "arm_compute/core/CL/CLTypes.h"
#include "arm_compute/core/CL/OpenCL.h"
#include <cstdint>
@@ -67,6 +69,11 @@ public:
* @return pointer to the CL data.
*/
const cl::Buffer &cl_data() const;
+ /** Wrapped quantization info data accessor
+ *
+ * @return A wrapped quantization info object.
+ */
+ CLQuantization quantization() const;
/** Enqueue a map operation of the allocated buffer on the given queue.
*
@@ -137,6 +144,8 @@ private:
CLMemory _memory; /**< OpenCL memory */
uint8_t *_mapping; /**< Pointer to the CPU mapping of the OpenCL buffer. */
CLTensor *_owner; /**< Owner of the allocator */
+ CLFloatArray _scale;
+ CLInt32Array _offset;
};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_CLTENSORALLOCATOR_H__ */
diff --git a/arm_compute/runtime/CL/CLTunerTypes.h b/arm_compute/runtime/CL/CLTunerTypes.h
index 7d13b6d3fa..20c026e4dc 100644
--- a/arm_compute/runtime/CL/CLTunerTypes.h
+++ b/arm_compute/runtime/CL/CLTunerTypes.h
@@ -26,6 +26,7 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/core/utils/misc/Utility.h"
+
#include <map>
namespace arm_compute
diff --git a/arm_compute/runtime/ITensorAllocator.h b/arm_compute/runtime/ITensorAllocator.h
index bb708f0b97..f829cf25ab 100644
--- a/arm_compute/runtime/ITensorAllocator.h
+++ b/arm_compute/runtime/ITensorAllocator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -96,5 +96,5 @@ private:
TensorInfo _info; /**< Tensor's metadata. */
size_t _alignment; /**< Tensor's alignment in bytes */
};
-}
+} // namespace arm_compute
#endif /*__ARM_COMPUTE_ITENSORALLOCATOR_H__ */