24.02.1
|
Go to the documentation of this file.
29 #ifndef ACL_INTERNAL_TEST_CKW_IN_DF
31 #else //ACL_INTERNAL_TEST_CKW_IN_DF
33 #endif //ACL_INTERNAL_TEST_CKW_IN_DF
37 namespace experimental
39 namespace dynamic_fusion
43 std::set<ElementwiseBinaryCommonAttributes::ElementwiseOp> supported_ops{
57 "Provided Elementwise operation not supported.");
70 "Wrong shape for dst.");
72 const auto &lhs_shape = lhs->tensor_shape();
73 const auto &rhs_shape = rhs->tensor_shape();
78 "Only LHS or RHS can be broadcasting, not both.");
85 "Dimension Y and Z must both be either broadcast or non-broadcast.");
88 "LHS broadcast in dimension 3 or higher is not supported.");
91 "RHS broadcast in dimension 3 or higher is not supported.");
120 #ifndef ACL_INTERNAL_TEST_CKW_IN_DF
121 _component_writer{std::make_unique<ClTemplateElementwiseBinary>(
id, tensors, attributes)}
122 #else //ACL_INTERNAL_TEST_CKW_IN_DF
123 _component_writer{std::make_unique<GpuCkwElementwiseBinary>(
id, tensors, attributes)}
124 #endif //ACL_INTERNAL_TEST_CKW_IN_DF
128 #ifndef ACL_INTERNAL_TEST_CKW_IN_DF
130 #else //ACL_INTERNAL_TEST_CKW_IN_DF
132 #endif //ACL_INTERNAL_TEST_CKW_IN_DF
134 return _component_writer.get();
ClComponentElementwiseBinary(ComponentId id, const Properties &properties, const ArgumentPack< ITensorInfo > &tensors, const Attributes &attributes)
Constructor.
ElementwiseBinaryCommonAttributes & operation(const ElementwiseBinaryCommonAttributes::ElementwiseOp &operation)
Set operation.
An interface used by ClTemplateWriter to write source code for a kernel component.
This is a generic class that packs the arguments of an operator.
~ClComponentElementwiseBinary() override
Destructor.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
virtual const IGpuCkwComponentDriver * ckw_component_driver() const
Properties common to all kernel component types.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
size_t total_size() const
Collapses all dimensions to a single linear total size.
@ U8
unsigned 8-bit number
#define ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(tensor)
@ S16
signed 16-bit number
bool have_different_dimensions(const Dimensions< T > &dim1, const Dimensions< T > &dim2, unsigned int upper_dim)
Properties properties() const
Get properties.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(...)
An interface used by GpuCkwDriver to write source code for a kernel component.
int32_t ComponentId
Uniquely identifies a kernel component within a workload.
#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
An abstract interface of a component.
@ S32
signed 32-bit number
static Status validate(const ArgumentPack< ITensorInfo > &tensors, const ElementwiseBinaryCommonAttributes &attributes)
Validate the component.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
@ F32
32-bit floating-point number
ArgumentPack< ITensorInfo > tensors() const
Get tensor arguments.
static TensorShape broadcast_shape(const Shapes &...shapes)
If shapes are broadcast compatible, return the broadcasted shape.
const IGpuTemplateComponentWriter * template_writer() const override
Get writer for the component.
ComponentId id() const
Get component id.