24 #ifdef ENABLE_EXPERIMENTAL_DYNAMIC_FUSION 35 namespace experimental
37 namespace dynamic_fusion
49 add_tensor(bp, weight->desc, weight_id, weight->id);
104 if(biases !=
nullptr)
107 "Biases size and number of dst feature maps should match");
109 "Biases should be one dimensional");
123 const auto converted = *utils::cast::polymorphic_downcast<const ClDirectConv2dKernel *>(&other);
165 const bool in_place = (lhs ==
dst) || (rhs == dst);
166 const bool src0_in_place = in_place && (lhs ==
dst);
175 "Wrong shape for dst, cannot do in_place calculation");
191 const auto converted = *utils::cast::polymorphic_downcast<const ClAddKernel *>(&other);
197 std::vector<const ClKernel *> kernels;
199 for(
const auto &
pack : sorted.second)
201 kernels.push_back(graph.
kernels.at(
pack.op).get());
207 std::vector<ClKernel *> kernels;
209 for(
const auto &
pack : sorted.second)
211 kernels.push_back(graph.
kernels.at(
pack.op).get());
virtual size_t num_dimensions() const =0
The number of dimensions of the tensor (rank)
size_t bottom
Padding across the height dimension on the bottom, in elements.
#define ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(tensor)
bool operator==(const ClKernel &other) const override
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_LAYOUT_NOT_IN(t,...)
ITensorDescPack< ClKernelTensor > tensors() const
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(...)
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
1 channel, 1 F32 per channel
DimensionRoundingType
Dimension rounding type when down-scaling on CNNs.
static TensorShape broadcast_shape(const Shapes &... shapes)
If shapes are broadcast compatible, return the broadcasted shape.
Store the tensor's metadata.
static Status validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const ClDirectConv2dKernelDescriptor &conv2d_desc)
size_t x() const
Semantic accessor for width as x.
std::pair< Status, std::vector< OpPack > > topological_sort() const
Sort the graph in a topological order.
static Status validate(const ITensorInfo *lhs, const ITensorInfo *rhs, const ITensorInfo *dst)
std::vector< const ClKernel * > traverse(const ClKernelFusionGroup &group)
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
SimpleTensor< float > src
Copyright (c) 2017-2022 Arm Limited.
1 channel, 1 F16 per channel
Status add_kcomp_eltwise_add(ClKernelBlueprint &kernel_blueprint, const ClEltwiseAddKernelDescriptor &, ArgumentID src0_id, ArgumentID src1_id, ArgumentID &dst_id)
Component: Eltwise Add.
Intermediate representation of the final, complete kernel source.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
size_t right
Padding across the width dimension on the right, in elements.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
size_t total_size() const
Collapses all dimensions to a single linear total size.
bool have_different_dimensions(const Dimensions< T > &dim1, const Dimensions< T > &dim2, unsigned int upper_dim)
Status add_kcomp_direct_conv2d(ClKernelBlueprint &kernel_blueprint, const ClDirectConv2dKernelDescriptor &direct_conv2d_desc, ArgumentID src_id, ArgumentID weight_id, ArgumentID bias_id, ArgumentID &dst_id)
Component: Direct Convolution.
Padding and stride information class.
ClDirectConv2dKernelDescriptor desc
size_t left
Padding across the width dimension on the left, in elements.
size_t y() const
Semantic accessor for height as y.
Status generate(ClKernelBlueprint &bp) const override
bool operator==(const ClKernel &other) const override
OpTensor add_tensor(OperatorGraph &graph, ITensorInfo &info)
Associate a TensorInfo with a newly created OpTensor in the graph.
size_t get_data_layout_dimension_index(const DataLayout &data_layout, const DataLayoutDimension &data_layout_dimension)
Get the index of the given dimension.
DependencyGraph::Id ArgumentID
Status generate(ClKernelBlueprint &bp) const override
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
Num samples, height, width, channels.
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
size_t top
Padding across the height dimension on the top, in elements.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
DataLayout
[DataLayout enum definition]
TensorShape compute_deep_convolution_shape(const TensorShape &input_shape, DataLayout input_data_layout, const TensorShape &weights_shape, const PadStrideInfo &conv_info)
Calculate the deep convolution shape output shape of a tensor.
virtual DataLayout data_layout() const =0
Get the data layout of the tensor.
ClKernelConfig config() const