64 if(w_out < 512 && h_out < 512)
73 std::set<std::string> build_opts;
75 build_opts.emplace((
"#define " + dt_name));
87 #if defined(TRANSPOSE_4X4) 88 build_opts.emplace((
"#define TRANSPOSE_4X4"));
89 num_elems_processed_per_iteration = 4;
90 #elif defined(TRANSPOSE_8X8) 93 build_opts.emplace(
"#define TRANSPOSE_8X8");
94 num_elems_processed_per_iteration = 8;
98 build_opts.emplace(
"#define TRANSPOSE_8X8_SQUARE");
99 num_elems_processed_per_iteration = 8;
107 const unsigned int width_aligned = num_elems_processed_per_iteration *
static_cast<unsigned int>(_lws_hint[0]);
108 const unsigned int height_aligned = num_elems_processed_per_iteration *
static_cast<unsigned int>(_lws_hint[1]);
123 IGCKernel::configure(win);
137 unsigned int idx = 0;
141 _kernel.update_shader_params();
142 enqueue(*
this, slice, _lws_hint);
Window first_slice_window_2D() const
First 2D slice of the window.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
const Window & window() const
The maximum window the kernel can be executed on.
void enqueue(IGCKernel &kernel, const Window &window, const gles::NDRange &lws=gles::NDRange(1U, 1U, 1U))
Add the kernel to the command queue with the given window.
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
std::string to_string(T &&value)
Convert integer and float values to string.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
1 channel, 1 F32 per channel
Interface for GLES Compute tensor.
bool slide_window_slice_2D(Window &slice) const
Slide the passed 2D window slice.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
virtual ValidRegion valid_region() const =0
Valid region of the tensor.
Implementation of a static rectangular access pattern.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(...)
auto ceil_to_multiple(S value, T divisor) -> decltype(((value+divisor - 1)/divisor) *divisor)
Computes the smallest number larger or equal to value that is a multiple of divisor.
Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context...
Class to describe a number of elements in each dimension.
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...
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void add_2D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx...
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Wrapper to configure the Khronos EGL and OpenGL ES C header.
static GCKernelLibrary & get()
Get the static instance of GCKernelLibrary.
void set_dimension_step(size_t dimension, int step)
Set the step of a given dimension.
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(...)
void run(const Window &window) override
Enqueue the OpenGL ES shader to process the given window.
Class interface for specifying NDRange values.
GCKernel create_kernel(const std::string &shader_name, const StringSet &build_options_set={}) const
Creates a kernel from the kernel library.
unsigned int num_elems_processed_per_iteration
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
void configure(const IGCTensor *input, IGCTensor *output)
Initialise the kernel's input and output.
Describe a multidimensional execution window.
TensorShape & set(size_t dimension, size_t value, bool apply_dim_correction=true, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
void set_valid_region(const Window &window, const ValidRegion &input_valid_region)
Set the valid region based on the static access pattern and valid region of the inputs.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)