COMPMID-3393: Minor tweaks on memory injection interface
* Avoid the need to overload workspace() everytime
* Remove the Layer suffix from the operators
* Clean interface by removing default arguments when unsupported
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I7710ecd485cae13e9c2d45216debbd8103bc5a0f
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3610
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/runtime/NEON/functions/NEReshapeLayer.cpp b/src/runtime/NEON/functions/NEReshapeLayer.cpp
index 101fdbd..47d5519 100644
--- a/src/runtime/NEON/functions/NEReshapeLayer.cpp
+++ b/src/runtime/NEON/functions/NEReshapeLayer.cpp
@@ -35,29 +35,24 @@
{
namespace experimental
{
-void NEReshapeLayer::configure(const ITensorInfo *input, ITensorInfo *output)
+void NEReshape::configure(const ITensorInfo *input, ITensorInfo *output)
{
auto k = arm_compute::support::cpp14::make_unique<NEReshapeLayerKernel>();
k->configure(input, output);
_kernel = std::move(k);
}
-Status NEReshapeLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
+Status NEReshape::validate(const ITensorInfo *input, const ITensorInfo *output)
{
return arm_compute::NEReshapeLayerKernel::validate(input, output);
}
-
-MemoryRequirements NEReshapeLayer::workspace() const
-{
- return MemoryRequirements{};
-}
} // namespace experimental
struct NEReshapeLayer::Impl
{
- const ITensor *src{ nullptr };
- ITensor *dst{ nullptr };
- std::unique_ptr<experimental::NEReshapeLayer> op{ nullptr };
+ const ITensor *src{ nullptr };
+ ITensor *dst{ nullptr };
+ std::unique_ptr<experimental::NEReshape> op{ nullptr };
};
NEReshapeLayer::NEReshapeLayer()
@@ -75,14 +70,14 @@
{
_impl->src = input;
_impl->dst = output;
- _impl->op = arm_compute::support::cpp14::make_unique<experimental::NEReshapeLayer>();
+ _impl->op = arm_compute::support::cpp14::make_unique<experimental::NEReshape>();
_impl->op->configure(input->info(), output->info());
}
Status NEReshapeLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
{
ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output);
- ARM_COMPUTE_RETURN_ON_ERROR(experimental::NEReshapeLayer::validate(input, output));
+ ARM_COMPUTE_RETURN_ON_ERROR(experimental::NEReshape::validate(input, output));
return Status{};
}