24.02.1
|
A linear sequence of operators to be fused in a workload For the time being, this class is only used for validating operator fusion INVARIANTS: More...
#include <GpuOperatorGroup.h>
Public Member Functions | |
bool | try_add_operator (const Operator &op, bool is_output=false) const |
Try adding (without actually adding) an operator to the group. More... | |
void | add_operator (const Operator &op, bool is_output=false) |
Add an operator to the group. More... | |
Operator | new_operator (const GpuOperatorType &operator_type, const ArgumentPack< ITensorInfo > &tensors) const |
Create a new operator. More... | |
const Operator * | get_root_operator () const |
Get the "root operator" of the group, which is the first operator in a linear sequence. More... | |
Static Public Attributes | |
static constexpr size_t | max_fused_operators = 32 |
A linear sequence of operators to be fused in a workload For the time being, this class is only used for validating operator fusion INVARIANTS:
Definition at line 76 of file GpuOperatorGroup.h.
void add_operator | ( | const Operator & | op, |
bool | is_output = false |
||
) |
Add an operator to the group.
[in] | op | Operator to be added |
[in] | is_output | Whether this operator is the output operator. |
Definition at line 141 of file GpuOperatorGroup.cpp.
References DependencyGraph::add_operator_as_linear(), ARM_COMPUTE_ERROR_ON, Operator::id(), Operator::tensors(), and GpuOperatorGroup::try_add_operator().
Referenced by GpuOutput::create_op(), GpuSigmoid::create_op(), GpuTanh::create_op(), GpuClamp::create_op(), GpuSoftmax::create_op(), GpuReshape::create_op(), GpuDepthwiseConv2d::create_op(), GpuResize::create_op(), GpuCast::create_op(), GpuConv2d::create_op(), GpuPool2d::create_op(), and GpuElementwiseBinaryCommon::create_op().
const Operator * get_root_operator | ( | ) | const |
Get the "root operator" of the group, which is the first operator in a linear sequence.
Definition at line 155 of file GpuOperatorGroup.cpp.
References ARM_COMPUTE_ERROR_ON, and DependencyGraph::get_root_ops().
Referenced by GpuOperatorGroup::try_add_operator().
Operator new_operator | ( | const GpuOperatorType & | operator_type, |
const ArgumentPack< ITensorInfo > & | tensors | ||
) | const |
Create a new operator.
[in] | operator_type | GpuOperatorType of the new operator |
[in] | tensors | Tensor arguments to the new operator |
Definition at line 149 of file GpuOperatorGroup.cpp.
Referenced by GpuOutput::create_op(), GpuSigmoid::create_op(), GpuTanh::create_op(), GpuClamp::create_op(), GpuSoftmax::create_op(), GpuReshape::create_op(), GpuResize::create_op(), GpuDepthwiseConv2d::create_op(), GpuCast::create_op(), GpuConv2d::create_op(), GpuPool2d::create_op(), GpuElementwiseBinaryCommon::create_op(), GpuOutput::validate_op(), GpuSigmoid::validate_op(), GpuTanh::validate_op(), GpuReshape::validate_op(), GpuCast::validate_op(), GpuResize::validate_op(), GpuSoftmax::validate_op(), GpuClamp::validate_op(), GpuConv2d::validate_op(), GpuDepthwiseConv2d::validate_op(), GpuPool2d::validate_op(), and GpuElementwiseBinaryCommon::validate_op().
bool try_add_operator | ( | const Operator & | op, |
bool | is_output = false |
||
) | const |
Try adding (without actually adding) an operator to the group.
[in] | op | Operator to be added |
[in] | is_output | Whether this operator is the output operator. |
op
can be added while maintaining the invariants Definition at line 66 of file GpuOperatorGroup.cpp.
References ARM_COMPUTE_ERROR_ON, GpuOperatorGroup::get_root_operator(), arm_compute::detail::have_different_dimensions(), Operator::id(), GpuOperatorGroup::max_fused_operators, Operator::operator_type(), arm_compute::experimental::dynamic_fusion::Simple, tf_frozen_model_extractor::t, Operator::tensors(), DependencyGraph::try_add_operator_as_linear(), arm_compute::utils::cast::U, and arm_compute::experimental::dynamic_fusion::Unfusable.
Referenced by GpuOperatorGroup::add_operator(), GpuSigmoid::validate_op(), GpuTanh::validate_op(), GpuReshape::validate_op(), GpuCast::validate_op(), GpuResize::validate_op(), GpuSoftmax::validate_op(), GpuClamp::validate_op(), GpuConv2d::validate_op(), GpuDepthwiseConv2d::validate_op(), GpuPool2d::validate_op(), and GpuElementwiseBinaryCommon::validate_op().
|
staticconstexpr |
Definition at line 79 of file GpuOperatorGroup.h.
Referenced by GpuOperatorGroup::try_add_operator().