24.04
|
Go to the documentation of this file.
38 namespace experimental
40 namespace dynamic_fusion
44 Status is_supported_op_helper(
const GpuWorkloadContext &
context,
const ITensorInfo *
src,
const ITensorInfo *
dst)
49 TensorInfo dst_info_to_validate;
50 const ITensorInfo *dst_info_to_validate_ptr = &dst_info_to_validate;
54 dst_info_to_validate_ptr =
dst;
65 const auto properties =
68 ArgumentPack<ITensorInfo> arguments;
70 arguments.add_const_tensor(
ACL_DST, dst_info_to_validate_ptr);
85 return is_supported_op_helper(
context,
src,
nullptr);
107 "Operator fusion test failed. This operator cannot be fused into the workload");
Operator new_operator(const GpuOperatorType &operator_type, const ArgumentPack< ITensorInfo > &tensors) const
Create a new operator.
SimpleTensor< float > src
@ Run
Run every time after the first time.
@ Simple
Simple operators are operators that:
ITensorInfo * create_virtual_tensor()
Create a virtual (see MemoryType) tensor info and save it.
const GpuOperatorGroup & operator_group() const
Get operator group.
bool try_add_operator(const Operator &op, bool is_output=false) const
Try adding (without actually adding) an operator to the group.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
ActivationLayerInfo Attributes
Attributes are a set of backend-agnostic parameters that define what a component does.
A multi-input (tensors), multi-output (tensors) acyclic directed graph of gpu kernel components Its m...
This is a generic class that packs the arguments of an operator.
const GpuWorkloadContext * gpu_context() const
Get the gpu workload context of this sketch.
Implementation & implementation()
Get the implementation.
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Activation Layer Information class.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
#define ARM_COMPUTE_ERROR_THROW_ON(status)
const GpuKernelComponentGraph & component_graph() const
Get component graph.
A descriptor of a workload of operators.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
Provide context necessary for the creation and configuration of a workload e.g.
void add_const_tensor(Id id, const T *tensor)
Add const tensor to the pack.
const Context * context() const
Get workload context.
KernelProperties & stage(const UnitWorkloadStage &stage)
Describes when a unit workload is run.
GpuOperatorType
Contain properties common to all operator types.
Store the tensor's metadata.
void add_new_component(Args &&...args)
Create a new component and add it to the component graph Component id is automatically allocated.
static Status is_supported_op(const GpuWorkloadContext &context, const ITensorInfo *src)
Check if the operator configuration is supported, irrespective of fusion.
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Copyright (c) 2017-2024 Arm Limited.
@ F16
16-bit floating-point number
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
KernelProperties Properties
static ITensorInfo * create_op(GpuWorkloadSketch &sketch, ITensorInfo *src)
Create an operator and fuse it into the workload sketch.
Store the tensor's metadata.
#define ARM_COMPUTE_RETURN_ERROR_MSG(...)
An error is returned with the given description.
static Status validate(const Properties &properties, const ArgumentPack< ITensorInfo > &tensors, const Attributes &attributes)
Validate the component.
@ F32
32-bit floating-point number
void add_operator(const Operator &op, bool is_output=false)
Add an operator to the group.
#define ARM_COMPUTE_LOG_PARAMS(...)
static Status validate_op(const GpuWorkloadSketch &sketch, const ITensorInfo *src)
Validate the operator and check if it can be fused into the workload sketch.