From cc2877368d5e15d9ea89d31c84ec651fc0fffd13 Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Thu, 19 Jan 2023 15:56:00 +0000 Subject: Change dynamic fusion API to return destination tensor info The new dynamic fusion API is introduced in the following patch: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8906 For each operator (except Conv2D, which is migrated in the above patch), we - remove destination tensor from is_supported, validate and create calls - make create_op return ITensorInfo* to the intermediate destination object Affected operators: - DepthwiseConv2D - Cast - Elementwise Ops - Clamp - Reshape - Resize Resolves: COMPMID-5777 Change-Id: Ib60ec8a5f081752808455d7a7d790f2ed0627059 Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8991 Reviewed-by: Ramy Elgammal Reviewed-by: Jakub Sujak Dynamic-Fusion: Ramy Elgammal Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Benchmark: Arm Jenkins --- .../sketch/gpu/operators/GpuDepthwiseConv2d.h | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'arm_compute/dynamic_fusion/sketch/gpu/operators/GpuDepthwiseConv2d.h') diff --git a/arm_compute/dynamic_fusion/sketch/gpu/operators/GpuDepthwiseConv2d.h b/arm_compute/dynamic_fusion/sketch/gpu/operators/GpuDepthwiseConv2d.h index a36ab62143..a0cb292730 100644 --- a/arm_compute/dynamic_fusion/sketch/gpu/operators/GpuDepthwiseConv2d.h +++ b/arm_compute/dynamic_fusion/sketch/gpu/operators/GpuDepthwiseConv2d.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Arm Limited. + * Copyright (c) 2022-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -59,34 +59,42 @@ public: * @param[in] src Source tensor * @param[in] wei Weight tensor * @param[in] bia (Optional) Bias tensor - * @param[out] dst Destination tensor. If an uninitialized ITensorInfo is passed in, it will be auto-initialized * @param[in] attributes Operator attributes + * + * @return Pointer for the destination tensor info */ - static void create_op(GpuWorkloadSketch &sketch, - ITensorInfo *src, - ITensorInfo *wei, - ITensorInfo *bia, - ITensorInfo *dst, - const Attributes &attributes); + static ITensorInfo *create_op(GpuWorkloadSketch &sketch, + ITensorInfo *src, + ITensorInfo *wei, + ITensorInfo *bia, + const Attributes &attributes); /** Check if the operator configuration is supported, irrespective of fusion - * Similar to @ref GpuDepthwiseConv2d::create_op() + * + * @param[in] context Workload context within which the operator is running + * @param[in] src Source tensor + * @param[in] wei Weight tensor + * @param[in] bia (Optional) Bias tensor + * @param[in] attributes Operator attributes + * + * @return Status */ static Status is_supported_op(const GpuWorkloadContext &context, const ITensorInfo *src, const ITensorInfo *wei, const ITensorInfo *bia, - const ITensorInfo *dst, const Attributes &attributes); /** Check if the operator configuration is supported and if it can be fused into the workload sketch. - * Similar to @ref GpuDepthwiseConv2d::create_op() + * + * Parameters are similar to @ref GpuDepthwiseConv2d::create_op() + * + * @return Status */ static Status validate_op(const GpuWorkloadSketch &sketch, const ITensorInfo *src, const ITensorInfo *wei, const ITensorInfo *bia, - const ITensorInfo *dst, const Attributes &attributes); }; } // namespace dynamic_fusion -- cgit v1.2.1