aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/CLTensorAllocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/CL/CLTensorAllocator.cpp')
-rw-r--r--src/runtime/CL/CLTensorAllocator.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/runtime/CL/CLTensorAllocator.cpp b/src/runtime/CL/CLTensorAllocator.cpp
index 60e1ca8df6..2b5fbb8241 100644
--- a/src/runtime/CL/CLTensorAllocator.cpp
+++ b/src/runtime/CL/CLTensorAllocator.cpp
@@ -128,17 +128,8 @@ void CLTensorAllocator::allocate()
// Allocate tensor backing memory
if(_associated_memory_group == nullptr)
{
- if(_memory.region() != nullptr && _memory.cl_region()->cl_data().get() != nullptr)
- {
- // Memory is already allocated. Reuse it if big enough, otherwise fire an assertion
- ARM_COMPUTE_ERROR_ON_MSG(info().total_size() > _memory.region()->size(),
- "Reallocation of a bigger memory region is not allowed!");
- }
- else
- {
- // Perform memory allocation
- _memory.set_owned_region(allocate_region(CLScheduler::get().context(), info().total_size(), 0));
- }
+ // Perform memory allocation
+ _memory.set_owned_region(allocate_region(CLScheduler::get().context(), info().total_size(), 0));
}
else
{