aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/NEON/functions/NEGEMMConv2d.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2021-06-07 15:30:26 +0100
committerSheri Zhang <sheri.zhang@arm.com>2021-06-07 16:27:33 +0000
commit8ae3cdadbc96910171d35abaab633be03b07d6f4 (patch)
treedd2c1fb9c2c05b88869a341cf2c5e4aca361e0f8 /src/runtime/NEON/functions/NEGEMMConv2d.cpp
parent18834933ac69330190a974c42ce0a22264a76431 (diff)
downloadComputeLibrary-8ae3cdadbc96910171d35abaab633be03b07d6f4.tar.gz
Revert "Implement memory injection in CpuDirectGemmConv2d"
This reverts commit b3be45759bdd0749ae3a16fe470820f0d9830ea9. Resolves: COMPMID-4548 Change-Id: I46e0d8c67ddf988af3ce38f83177cda412db916c Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5775 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Sheri Zhang <sheri.zhang@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEGEMMConv2d.cpp')
-rw-r--r--src/runtime/NEON/functions/NEGEMMConv2d.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/runtime/NEON/functions/NEGEMMConv2d.cpp b/src/runtime/NEON/functions/NEGEMMConv2d.cpp
index 790543a34a..94ceb6d27c 100644
--- a/src/runtime/NEON/functions/NEGEMMConv2d.cpp
+++ b/src/runtime/NEON/functions/NEGEMMConv2d.cpp
@@ -26,37 +26,24 @@
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
#include "arm_compute/core/utils/quantization/AsymmHelpers.h"
#include "arm_compute/runtime/NEON/NEScheduler.h"
-#include "src/core/helpers/MemoryHelpers.h"
#include "src/runtime/cpu/operators/CpuGemmDirectConv2d.h"
#include <set>
namespace arm_compute
{
-using OperatorType = cpu::CpuGemmDirectConv2d;
-using WorkspaceDataType = WorkspaceData<Tensor>;
+using OperatorType = cpu::CpuGemmDirectConv2d;
struct NEGEMMConv2d::Impl
{
ITensorPack tensors{};
- MemoryGroup mg{};
std::unique_ptr<OperatorType> op{ nullptr };
- WorkspaceDataType ws{};
-
- void allocate_and_add_workspace()
- {
- if(op)
- {
- ws = manage_workspace<Tensor>(op->workspace(), mg, tensors);
- }
- }
};
NEGEMMConv2d::NEGEMMConv2d(const std::shared_ptr<IMemoryManager> &memory_manager)
: _impl(std::make_unique<Impl>())
{
- _impl->op = std::make_unique<OperatorType>();
- _impl->mg = MemoryGroup(memory_manager);
+ _impl->op = std::make_unique<OperatorType>(memory_manager);
}
NEGEMMConv2d::~NEGEMMConv2d() = default;
@@ -68,9 +55,7 @@ void NEGEMMConv2d::configure(ITensor *input, const ITensor *weights, const ITens
_impl->tensors.add_const_tensor(TensorType::ACL_SRC_2, biases);
_impl->tensors.add_tensor(TensorType::ACL_DST, output);
- _impl->op->configure(input->info(), weights->info(), ((biases) ? biases->info() : nullptr), output->info(), info);
-
- _impl->allocate_and_add_workspace();
+ _impl->op->configure(input->info(), weights->info(), biases->info(), output->info(), info);
}
Status NEGEMMConv2d::validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const Conv2dInfo &info)