25 #ifndef ARM_COMPUTE_CL_CLUTILS_H 26 #define ARM_COMPUTE_CL_CLUTILS_H 57 namespace experimental
84 using Slots = std::vector<unsigned int>;
85 using Config = std::map<PostOpTypeSequence, std::tuple<NamePostfix, Slots>>;
132 Config _supported_config{};
experimental::PostOpList< ITensorInfo * > post_ops
bool is_post_op_sequence_supported(const PostOpList< ITensorInfo *> &post_ops) const
Check if the post op sequence is supported in the current configuration.
Store the tensor's metadata.
Copyright (c) 2017-2022 Arm Limited.
std::string NamePostfix
CL kernel name postfix for post ops.
void set_post_ops_cl_kernel_name(std::string &kernel_name, const PostOpList< ITensorInfo *> &post_ops) const
Helper function to set PostOp kernel name.
PostOpCLKernelUtils(const Config &config)
void set_post_ops_cl_build_options(CLBuildOptions &built_opts, const PostOpList< ITensorInfo *> &post_ops) const
Helper function to set PostOp related build options.
static bool are_post_op_shapes_compliant(const ITensorInfo *dst, const experimental::PostOpList< ITensorInfo *> &post_ops)
Check if post op argument tensor shapes are compliant All post ops must not alter the shape of the or...
std::map< PostOpTypeSequence, std::tuple< NamePostfix, Slots > > Config
Manage validation, building and configurations of PostOp CL kernels.
Wrapper to configure the Khronos OpenCL C++ header.
cl::Image2D create_image2d_from_buffer(const cl::Context &ctx, const cl::Buffer &buffer, const TensorShape &shape2d, DataType data_type, size_t image_row_pitch)
Create a cl::Image2D object from an OpenCL buffer.
std::vector< unsigned int > Slots
CL kernels that supports post ops assign each post op to a 'slot', in accordance with the postfix For...
DataType
Available data types.
A sequence of PostOps that can be appended to the end of other operators.