aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/experimental
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-04-22 21:13:21 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-05-18 14:48:39 +0000
commit856f66e6c61b77d03f754cd0fa8439891f0e4aca (patch)
treef9379cd0853ac407109e54c3d53b385ceee066c2 /arm_compute/core/experimental
parent37f4b2ef1ea225a90ccb563fcb2c08f8fb0fb5d5 (diff)
downloadComputeLibrary-856f66e6c61b77d03f754cd0fa8439891f0e4aca.tar.gz
Port CLGEMM to memory injecting interface
Moves the following kernels: - CLGEMMMatrixMultiplyKernel - CLGEMMMatrixMultiplyNativeKernel - CLGEMMMatrixMultipluReshapedKernel - CLGEMMMatrixMultiplyReshapedOnlyRHSKernel Moves the following functions - CLGEMM Introduces facilities to easy handling of auxiliary temporary buffers under then new run interface. Such are: - CLAuxTensorHandler: That allows wrapping of workspace buffers memory to CLBuffer objects - Ability to inject TensorInfo to allocator without transferring ownership. This reduce the copy overhead if needed. Resolves: COMPMID-4188 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I7055435d831b05b749b26302082e4ac45f26dfb0 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5498 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/experimental')
-rw-r--r--arm_compute/core/experimental/Types.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/arm_compute/core/experimental/Types.h b/arm_compute/core/experimental/Types.h
index 7ddb930421..92ece460dc 100644
--- a/arm_compute/core/experimental/Types.h
+++ b/arm_compute/core/experimental/Types.h
@@ -47,6 +47,7 @@ enum TensorType : int32_t
ACL_DST_0 = 30,
ACL_DST_1 = 31,
ACL_DST_2 = 32,
+ ACL_BIAS = ACL_SRC_2,
ACL_INT = 50,
ACL_INT_0 = 50,
ACL_INT_1 = 51,
@@ -54,21 +55,40 @@ enum TensorType : int32_t
ACL_INT_3 = 53,
ACL_INT_4 = 54,
ACL_SRC_VEC = 256,
+ ACL_DST_VEC = 512,
+ ACL_INT_VEC = 1024
};
namespace experimental
{
+enum class MemoryLifetime
+{
+ Temporary = 0,
+ Persistent = 1,
+ Prepare = 2,
+};
struct MemoryInfo
{
- MemoryInfo(TensorType type, size_t size, size_t alignment) noexcept
- : type(type),
+ MemoryInfo() = default;
+
+ MemoryInfo(int slot, size_t size, size_t alignment = 0) noexcept
+ : slot(slot),
+ size(size),
+ alignment(alignment)
+ {
+ }
+
+ MemoryInfo(int slot, MemoryLifetime lifetime, size_t size, size_t alignment = 0) noexcept
+ : slot(slot),
+ lifetime(lifetime),
size(size),
alignment(alignment)
{
}
- TensorType type;
- size_t size;
- size_t alignment;
+ int slot{ ACL_UNKNOWN };
+ MemoryLifetime lifetime{ MemoryLifetime::Temporary };
+ size_t size{ 0 };
+ size_t alignment{ 64 };
};
using MemoryRequirements = std::vector<MemoryInfo>;