diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2022-03-28 21:32:33 +0100 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2022-04-13 10:36:30 +0000 |
commit | 16c5697085c256c19fb8ba4bef6188d61f30a88b (patch) | |
tree | 609bfe2082c939ff37bdf6ef37bc22fc071bd934 /src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp | |
parent | 5d606cccaabdfc435734c9fb51e11f14f3724a23 (diff) | |
download | ComputeLibrary-16c5697085c256c19fb8ba4bef6188d61f30a88b.tar.gz |
Add DirectConvolution2D kernel component for dynamic fusion
Resolves: COMPMID-5156
Change-Id: I438da924cb80d3bce72106b06ca7181e0606bd01
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7399
Reviewed-by: SiCong Li <sicong.li@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp')
-rw-r--r-- | src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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<ClDirectConvolutionKernelComponent>( + &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<ClStoreIndirectWidthSelectKernelComponent>( + &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."); } |