Create CpuGemmDirectConv2d
As the first phase of making NEGEMMConv2d stateless,
CpuGemmDirectConv2d operator is created. Kernels and
operators used by the operator use TensorInfo pointers
instead of Tensor pointers.
The CpuGemmDirectConv2d isn't completely stateless
because it manages one intermediate tensor internally.
This will be resolved by implementing memory injection
mechanism with the following patches.
Also, weight manager of CpuGemmAssemblyDispatch is disabled
to enable this work.
Implements: COMPMID-4506
Change-Id: Iec3ca6de29d98bef7ea95e8f4473d6dc0024a140
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5672
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/runtime/NEON/functions/NEGEMM.cpp b/src/runtime/NEON/functions/NEGEMM.cpp
index b84128e..7318c3e 100644
--- a/src/runtime/NEON/functions/NEGEMM.cpp
+++ b/src/runtime/NEON/functions/NEGEMM.cpp
@@ -89,10 +89,19 @@
if(run_optimised)
{
- const ITensor *c_to_use = is_c_bias ? c : nullptr;
- _asm_glue->configure(a, b, c_to_use, d, asm_info);
+ const ITensor *c_to_use = is_c_bias ? c : nullptr;
+ const ITensorInfo *c_info_to_use = c_to_use != nullptr ? c_to_use->info() : nullptr;
+ _asm_glue->configure(a->info(), b->info(), c_info_to_use, d->info(), asm_info);
ARM_COMPUTE_ERROR_ON(!_asm_glue->is_configured());
+ _asm_glue_tensors =
+ {
+ { ACL_SRC_0, a },
+ { ACL_SRC_1, b },
+ { ACL_SRC_2, c_to_use },
+ { ACL_DST, d },
+ };
+
// Scale product by alpha
if(_run_alpha_scale)
{
@@ -314,7 +323,7 @@
if(_asm_glue->is_configured())
{
- _asm_glue->run();
+ _asm_glue->run(_asm_glue_tensors);
if(_run_alpha_scale)
{
_alpha_scale_func.run();
@@ -368,7 +377,7 @@
ARM_COMPUTE_ERROR_ON(!_original_b->is_used());
}
- _asm_glue->prepare();
+ _asm_glue->prepare(_asm_glue_tensors);
if(!original_b_managed_by_weights_manager)
{
_original_b->mark_as_unused();