diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-09-09 19:23:39 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-09-16 15:11:51 +0000 |
commit | caa7deedfe1b0d0020c6099d8f616ec92b1bd5e9 (patch) | |
tree | f33643941f0824d5fa79140070a7c9993acb2851 /arm_compute | |
parent | d87a7b297a5bfc2bad3ba78ea97754d7894e82ef (diff) | |
download | ComputeLibrary-caa7deedfe1b0d0020c6099d8f616ec92b1bd5e9.tar.gz |
COMPMID-2641 [NEON] Create a test case for dynamic tensor support
Change-Id: I181e9acffd34ff1c807c65a822cfafb7327b8c8a
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1913
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/runtime/MemoryGroupBase.h | 10 | ||||
-rw-r--r-- | arm_compute/runtime/OffsetLifetimeManager.h | 8 | ||||
-rw-r--r-- | arm_compute/runtime/OffsetMemoryPool.h | 5 |
3 files changed, 16 insertions, 7 deletions
diff --git a/arm_compute/runtime/MemoryGroupBase.h b/arm_compute/runtime/MemoryGroupBase.h index 7dc18c8b4f..e3f38f7cfe 100644 --- a/arm_compute/runtime/MemoryGroupBase.h +++ b/arm_compute/runtime/MemoryGroupBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -101,7 +101,7 @@ inline MemoryGroupBase<TensorType>::MemoryGroupBase(std::shared_ptr<IMemoryManag template <typename TensorType> inline void MemoryGroupBase<TensorType>::manage(TensorType *obj) { - if(_memory_manager && _mappings.empty()) + if(_memory_manager) { ARM_COMPUTE_ERROR_ON(!_memory_manager->lifetime_manager()); @@ -119,11 +119,7 @@ inline void MemoryGroupBase<TensorType>::manage(TensorType *obj) template <typename TensorType> inline void MemoryGroupBase<TensorType>::finalize_memory(TensorType *obj, IMemory &obj_memory, size_t size, size_t alignment) { - // TODO (geopin01) : Check size (track size in MemoryMappings) - // Check if existing mapping is valid - ARM_COMPUTE_ERROR_ON(!_mappings.empty() && (_mappings.find(&obj_memory) == std::end(_mappings))); - - if(_memory_manager && _mappings.empty()) + if(_memory_manager) { ARM_COMPUTE_ERROR_ON(!_memory_manager->lifetime_manager()); _memory_manager->lifetime_manager()->end_lifetime(obj, obj_memory, size, alignment); diff --git a/arm_compute/runtime/OffsetLifetimeManager.h b/arm_compute/runtime/OffsetLifetimeManager.h index 26aeb1ef6a..748f3b6f81 100644 --- a/arm_compute/runtime/OffsetLifetimeManager.h +++ b/arm_compute/runtime/OffsetLifetimeManager.h @@ -41,6 +41,9 @@ class IMemoryPool; class OffsetLifetimeManager : public ISimpleLifetimeManager { public: + using info_type = BlobInfo; + +public: /** Constructor */ OffsetLifetimeManager(); /** Prevent instances of this class to be copy constructed */ @@ -51,6 +54,11 @@ public: OffsetLifetimeManager(OffsetLifetimeManager &&) = default; /** Allow instances of this class to be moved */ OffsetLifetimeManager &operator=(OffsetLifetimeManager &&) = default; + /** Accessor to the pool internal configuration meta-data + * + * @return Pool internal configuration meta-data + */ + const info_type &info() const; // Inherited methods overridden: std::unique_ptr<IMemoryPool> create_pool(IAllocator *allocator) override; diff --git a/arm_compute/runtime/OffsetMemoryPool.h b/arm_compute/runtime/OffsetMemoryPool.h index bc09de6a14..26005706df 100644 --- a/arm_compute/runtime/OffsetMemoryPool.h +++ b/arm_compute/runtime/OffsetMemoryPool.h @@ -58,6 +58,11 @@ public: OffsetMemoryPool(OffsetMemoryPool &&) = default; /** Allow instances of this class to be move assigned */ OffsetMemoryPool &operator=(OffsetMemoryPool &&) = default; + /** Accessor to the pool internal configuration meta-data + * + * @return Pool internal configuration meta-data + */ + const BlobInfo &info() const; // Inherited methods overridden: void acquire(MemoryMappings &handles) override; |