24.04
|
#include <GpuElementwiseBinaryCommon.h>
Static Public Member Functions | |
static ITensorInfo * | create_op (GpuWorkloadSketch &sketch, ITensorInfo *lhs, ITensorInfo *rhs, const ElementwiseBinaryCommonAttributes &attributes) |
Create an operator and fuse it into the workload sketch. More... | |
static Status | is_supported_op (const GpuWorkloadContext &context, const ITensorInfo *lhs, const ITensorInfo *rhs, const ElementwiseBinaryCommonAttributes &attributes) |
Check if the operator configuration is supported, irrespective of fusion. More... | |
static Status | validate_op (const GpuWorkloadSketch &sketch, const ITensorInfo *rhs, const ITensorInfo *lhs, const ElementwiseBinaryCommonAttributes &attributes) |
Validate the operator and check if it can be fused into the workload sketch. More... | |
Operator interface.
Definition at line 67 of file GpuElementwiseBinaryCommon.h.
|
static |
Create an operator and fuse it into the workload sketch.
sketch
remains unchanged and valid.Valid data type configurations are checked at the operator level i.e. GpuAdd::validate_op(), GpuSub::validate_op(), ... etc.
Valid data layouts:
[in,out] | sketch | Workload sketch into which the operator will be fused |
[in] | lhs | Left hand side tensor info. Data types supported: U8/S16/S32/F16/F32. |
[in] | rhs | Right hand side tensor info. Data types supported: U8/S16/S32/F16/F32. |
[in] | attributes | ElementwiseBinaryCommonAttributes containing the operator type: ADD, SUB, DIV, ... etc. |
Definition at line 143 of file GpuElementwiseBinaryCommon.cpp.
References arm_compute::ACL_DST_0, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, ArgumentPack< T >::add_const_tensor(), GpuOperatorGroup::add_operator(), ArgumentPack< T >::add_tensor(), ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_LOG_PARAMS, GpuWorkloadSketch::Implementation::component_graph(), GpuWorkloadSketch::Implementation::context(), GpuWorkloadSketch::Implementation::create_virtual_tensor(), arm_compute::test::validation::dst, GpuWorkloadSketch::implementation(), GpuOperatorGroup::new_operator(), arm_compute::experimental::dynamic_fusion::OpenCL, GpuWorkloadSketch::Implementation::operator_group(), UnitWorkloadStage::Run, arm_compute::test::validation::sketch, and GpuElementwiseBinaryCommon::validate_op().
Referenced by GpuAdd::create_op(), GpuSub::create_op(), and GpuMul::create_op().
|
static |
Check if the operator configuration is supported, irrespective of fusion.
[in] | context | Workload context within which the operator is running |
[in] | lhs | Left hand side tensor info. Data types supported: U8/S16/S32/F16/F32. |
[in] | rhs | Right hand side tensor info. Data types supported: U8/S16/S32/F16/F32. |
[in] | attributes | ElementwiseBinaryCommonAttributes containing the operator type: ADD, SUB, DIV, ... etc. |
Definition at line 107 of file GpuElementwiseBinaryCommon.cpp.
References arm_compute::test::validation::context.
Referenced by GpuAdd::is_supported_op(), GpuSub::is_supported_op(), and GpuMul::is_supported_op().
|
static |
Validate the operator and check if it can be fused into the workload sketch.
Parameters are similar to GpuElementwiseBinaryCommon::create_op()
Definition at line 115 of file GpuElementwiseBinaryCommon.cpp.
References arm_compute::ACL_DST_0, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, ArgumentPack< T >::add_const_tensor(), ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_MSG, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, GpuWorkloadSketch::gpu_context(), ITensorInfo::has_valid_id(), GpuWorkloadSketch::implementation(), GpuOperatorGroup::new_operator(), GpuWorkloadSketch::Implementation::operator_group(), arm_compute::test::validation::sketch, and GpuOperatorGroup::try_add_operator().
Referenced by GpuElementwiseBinaryCommon::create_op(), GpuAdd::validate_op(), GpuSub::validate_op(), and GpuMul::validate_op().