From 31df05a1870662a7288fbaeb6fbc7fc458bb5a73 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Wed, 9 Nov 2022 15:57:48 +0000 Subject: Remove dynamic fusion prototype with tests and examples Public headers of the new experimental dynamic fusion can be found in arm_compute/dynamic_fusion/ New examples on how to use the interface can be found in tests/validation/dynamic_fusion/gpu/Integration.cpp Resolves COMPMID-5683 Change-Id: I7ccb902a227fb487562df15fc3c30118d1d95bbd Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8671 Reviewed-by: Jakub Sujak Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- .../dynamic_fusion/ClKernelBuildingAPI.cpp | 164 --------------------- 1 file changed, 164 deletions(-) delete mode 100644 src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp (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 deleted file mode 100644 index 9b6daae619..0000000000 --- a/src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2022 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifdef ENABLE_EXPERIMENTAL_DYNAMIC_FUSION - -#include "src/core/experimental/dynamic_fusion/ClKernelBuildingAPI.h" -#include "src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/Common.h" -#include "src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClKernelComponents.h" - -namespace arm_compute -{ -namespace experimental -{ -namespace dynamic_fusion -{ -ClKernelBlueprint::ClKernelBlueprint() - : _impl{ std::make_unique() } -{ -} - -ClKernelBlueprint::~ClKernelBlueprint() = default; - -ClKernelBlueprint::Implementation &ClKernelBlueprint::impl() -{ - return *_impl; -} -const ClKernelBlueprint::Implementation &ClKernelBlueprint::impl() const -{ - return *_impl; -} - -Status add_tensor(ClKernelBlueprint &kernel_blueprint, ITensorInfo *tensor_info, ArgumentID &id, ArgumentID merge_point) -{ - id = kernel_blueprint.impl().add_kernel_tensor(tensor_info, merge_point); - return Status{}; -} - -Status add_kcomp_eltwise_op(ClKernelBlueprint &kernel_blueprint, const ClElementwiseKernelDescriptor &desc, - ArgumentID src0_id, ArgumentID src1_id, ArgumentID &dst_id) -{ - kernel_blueprint.impl().add_component( - std::make_unique( - &kernel_blueprint, - desc, - SharedVarLink{ src0_id, SharedVarIO::Input }, - SharedVarLink{ src1_id, SharedVarIO::Input }, - SharedVarLink{ dst_id, SharedVarIO::Output })); - - return Status{}; -} - -Status add_kcomp_floor(ClKernelBlueprint &kernel_blueprint, const ClFloorKernelDescriptor &, - ArgumentID src_id, ArgumentID &dst_id) -{ - kernel_blueprint.impl().add_component( - std::make_unique( - &kernel_blueprint, - SharedVarLink{ src_id, SharedVarIO::Input }, - SharedVarLink{ dst_id, SharedVarIO::Output })); - - return Status{}; -} - -Status add_kcomp_activation(ClKernelBlueprint &, const ClActivationKernelDescriptor &, ArgumentID, ArgumentID &) -{ - return Status{}; -} - -Status add_kcomp_direct_conv2d(ClKernelBlueprint &kernel_blueprint, - const ClDirectConv2dKernelDescriptor &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 }, - SharedVarLink{ weight_id, SharedVarIO::Input }, - SharedVarLink{ dst_id, SharedVarIO::Output }, - SharedVarLink{ bias_id, SharedVarIO::Input })); - - return Status{}; -} - -Status add_kcomp_store(ClKernelBlueprint &kernel_blueprint, const StoreType &store_type, ArgumentID src_tile, ArgumentID dst_tile) -{ - switch(store_type) - { - case StoreType::StoreBlockBoundaryAware: - kernel_blueprint.impl().add_component( - std::make_unique( - &kernel_blueprint, - SharedVarLink{ src_tile, SharedVarIO::Input }, - SharedVarLink{ dst_tile, SharedVarIO::Output })); - break; - case StoreType::TStoreIndirectWidthSelect: - kernel_blueprint.impl().add_component( - std::make_unique( - &kernel_blueprint, - SharedVarLink{ src_tile, SharedVarIO::Input }, - SharedVarLink{ dst_tile, SharedVarIO::Output })); - break; - default: - ARM_COMPUTE_ERROR("Store mode not yet supported."); - } - - return Status{}; -} - -Status update_merge_point(ClKernelBlueprint &bp, ArgumentID t_id, ArgumentID merge_point) -{ - return bp.impl().update_merge_point(t_id, merge_point); -} - -Status set_tile_info(ClKernelBlueprint &bp, const TileDescriptor &tile_info) -{ - bp.impl().set_tile_info(tile_info); - return Status{}; -} -Status build(ClKernelCode &code, const ClCodeBuilderContext &, ClKernelBlueprint &kernel_blueprint) -{ - kernel_blueprint.impl().finalize(); - code.name = kernel_blueprint.impl().build_kernel_name(); - code.code = kernel_blueprint.impl().build_code(); - - code.config_id = kernel_blueprint.impl().build_config_id(); - code.build_options = kernel_blueprint.impl().build_options(); - code.window = kernel_blueprint.impl().get_execution_window(); - code.arguments = kernel_blueprint.impl().get_arguments(); - - return Status{}; -} -DependencyGraph get_dependency_graph(const ClKernelBlueprint &blueprint) -{ - return blueprint.impl().get_graph(); -} -Status tune_static(ClExecutionDescriptor &, const ClKernelCode &) -{ - return Status{}; -} -} // namespace dynamic_fusion -} // namespace experimental -} // namespace arm_compute -#endif /* ENABLE_EXPERIMENTAL_DYNAMIC_FUSION */ \ No newline at end of file -- cgit v1.2.1