From 16c5697085c256c19fb8ba4bef6188d61f30a88b Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Mon, 28 Mar 2022 21:32:33 +0100 Subject: Add DirectConvolution2D kernel component for dynamic fusion Resolves: COMPMID-5156 Change-Id: I438da924cb80d3bce72106b06ca7181e0606bd01 Signed-off-by: Gunes Bayir Signed-off-by: Giorgio Arena Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7399 Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- .../dynamic_fusion/ClKernelBuildingAPI.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp') diff --git a/src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp b/src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp index 6db1ca4cf5..3e9ed060be 100644 --- a/src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp +++ b/src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp @@ -94,6 +94,23 @@ Status add_kcomp_activation(ClKernelBlueprint &, const ClKernelComponentDescript { return Status{}; } + +Status add_kcomp_direct_conv(ClKernelBlueprint &kernel_blueprint, const ClKernelComponentDescriptor &, + const DirectConvolutionDescriptor &direct_conv2d_desc, + ArgumentID src_id, ArgumentID weight_id, ArgumentID bias_id, ArgumentID &dst_id) +{ + kernel_blueprint.impl().add_component( + std::make_unique( + &kernel_blueprint, + direct_conv2d_desc, + SharedVarLink{ src_id, SharedVarIO::Input, kernel_blueprint.impl().group(src_id) }, + SharedVarLink{ weight_id, SharedVarIO::Input, kernel_blueprint.impl().group(weight_id) }, + SharedVarLink{ dst_id, SharedVarIO::Output, kernel_blueprint.impl().group(dst_id) }, + SharedVarLink{ bias_id, SharedVarIO::Input, kernel_blueprint.impl().group(bias_id) })); + + return Status{}; +} + Status add_kcomp_store(ClKernelBlueprint &kernel_blueprint, const ClKernelComponentDescriptor &, ArgumentID src_tile, ArgumentID dst_tile, const StoreType &store_type) { switch(store_type) @@ -105,6 +122,13 @@ Status add_kcomp_store(ClKernelBlueprint &kernel_blueprint, const ClKernelCompon SharedVarLink{ src_tile, SharedVarIO::Input, kernel_blueprint.impl().group(src_tile) }, SharedVarLink{ dst_tile, SharedVarIO::Output, kernel_blueprint.impl().group(dst_tile) })); break; + case StoreType::TStoreIndirectWidthSelect: + kernel_blueprint.impl().add_component( + std::make_unique( + &kernel_blueprint, + SharedVarLink{ src_tile, SharedVarIO::Input, kernel_blueprint.impl().group(src_tile) }, + SharedVarLink{ dst_tile, SharedVarIO::Output, kernel_blueprint.impl().group(dst_tile) })); + break; default: ARM_COMPUTE_ERROR("Store mode not yet supported."); } -- cgit v1.2.1