xref: /aosp_15_r20/external/ComputeLibrary/docs/user_guide/library.dox (revision c217d954acce2dbc11938adb493fc0abd69584f3)
1*c217d954SCole Faust///
2*c217d954SCole Faust/// Copyright (c) 2017-2021 Arm Limited.
3*c217d954SCole Faust///
4*c217d954SCole Faust/// SPDX-License-Identifier: MIT
5*c217d954SCole Faust///
6*c217d954SCole Faust/// Permission is hereby granted, free of charge, to any person obtaining a copy
7*c217d954SCole Faust/// of this software and associated documentation files (the "Software"), to
8*c217d954SCole Faust/// deal in the Software without restriction, including without limitation the
9*c217d954SCole Faust/// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10*c217d954SCole Faust/// sell copies of the Software, and to permit persons to whom the Software is
11*c217d954SCole Faust/// furnished to do so, subject to the following conditions:
12*c217d954SCole Faust///
13*c217d954SCole Faust/// The above copyright notice and this permission notice shall be included in all
14*c217d954SCole Faust/// copies or substantial portions of the Software.
15*c217d954SCole Faust///
16*c217d954SCole Faust/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*c217d954SCole Faust/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*c217d954SCole Faust/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19*c217d954SCole Faust/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20*c217d954SCole Faust/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21*c217d954SCole Faust/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22*c217d954SCole Faust/// SOFTWARE.
23*c217d954SCole Faust///
24*c217d954SCole Faustnamespace arm_compute
25*c217d954SCole Faust{
26*c217d954SCole Faust/**
27*c217d954SCole Faust@page architecture Library Architecture
28*c217d954SCole Faust
29*c217d954SCole Faust@tableofcontents
30*c217d954SCole Faust
31*c217d954SCole Faust@section architecture_core_vs_runtime Core vs Runtime libraries
32*c217d954SCole Faust
33*c217d954SCole FaustThe Core library is a low level collection of algorithms implementations, it is designed to be embedded in existing projects and applications:
34*c217d954SCole Faust
35*c217d954SCole Faust- It doesn't allocate any memory (All the memory allocations/mappings have to be handled by the caller).
36*c217d954SCole Faust- It doesn't perform any kind of multi-threading (but provide information to the caller about how the workload can be split).
37*c217d954SCole Faust
38*c217d954SCole FaustThe Runtime library is a very basic wrapper around the Core library which can be used for quick prototyping, it is basic in the sense that:
39*c217d954SCole Faust
40*c217d954SCole Faust- It allocates images and tensors by using standard malloc().
41*c217d954SCole Faust- It multi-threads Arm® Neon™ code in a very basic way using a very simple pool of threads.
42*c217d954SCole Faust- For OpenCL it uses the default CLScheduler command queue for all mapping operations and kernels.
43*c217d954SCole Faust
44*c217d954SCole FaustFor maximum performance, it is expected that the users would re-implement an equivalent to the runtime library which suits better their needs (With a more clever multi-threading strategy, load-balancing between Arm® Neon™ and OpenCL, etc.)
45*c217d954SCole Faust
46*c217d954SCole Faust@section architecture_fast_math Fast-math support
47*c217d954SCole Faust
48*c217d954SCole FaustCompute Library supports different types of convolution methods, fast-math flag is only used for the Winograd algorithm.
49*c217d954SCole FaustWhen the fast-math flag is enabled, both Arm® Neon™ and CL convolution layers will try to dispatch the fastest implementation available, which may introduce a drop in accuracy as well. The different scenarios involving the fast-math flag are presented below:
50*c217d954SCole Faust- For FP32:
51*c217d954SCole Faust    - no-fast-math: Only supports Winograd 3x3,3x1,1x3,5x1,1x5,7x1,1x7
52*c217d954SCole Faust    - fast-math: Supports Winograd 3x3,3x1,1x3,5x1,1x5,7x1,1x7,5x5,7x7
53*c217d954SCole Faust- For fp16:
54*c217d954SCole Faust    - no-fast-math: No Winograd support
55*c217d954SCole Faust    - fast-math: Supports Winograd 3x3,3x1,1x3,5x1,1x5,7x1,1x7,5x5,7x7
56*c217d954SCole Faust
57*c217d954SCole Faust@section bf16_acceleration BF16 acceleration
58*c217d954SCole Faust
59*c217d954SCole FaustRequired toolchain: android-ndk-r23-beta5 or later.
60*c217d954SCole Faust
61*c217d954SCole FaustTo build for BF16: "neon" flag should be set "=1" and "arch" has to be "=armv8.6-a", "=armv8.6-a-sve", or "=armv8.6-a-sve2". For example:
62*c217d954SCole Faust
63*c217d954SCole Faust	scons arch=armv8.6-a-sve neon=1 opencl=0 extra_cxx_flags="-fPIC" benchmark_tests=0 validation_tests=0 validation_examples=1 os=android Werror=0 toolchain_prefix=aarch64-linux-android29
64*c217d954SCole Faust
65*c217d954SCole FaustTo enable BF16 acceleration when running FP32 "fast-math" has to be enabled and that works only for Neon convolution layer using cpu gemm.
66*c217d954SCole FaustIn this scenario on CPU: the CpuGemmConv2d kernel performs the conversion from FP32, type of input tensor, to BF16 at block level to exploit the arithmetic capabilities dedicated to BF16. Then transforms back to FP32, the output tensor type.
67*c217d954SCole Faust
68*c217d954SCole Faust@section architecture_thread_safety Thread-safety
69*c217d954SCole Faust
70*c217d954SCole FaustAlthough the library supports multi-threading during workload dispatch, thus parallelizing the execution of the workload at multiple threads, the current runtime module implementation is not thread-safe in the sense of executing different functions from separate threads.
71*c217d954SCole FaustThis lies to the fact that the provided scheduling mechanism wasn't designed with thread-safety in mind.
72*c217d954SCole FaustAs it is true with the rest of the runtime library a custom scheduling mechanism can be re-implemented to account for thread-safety if needed and be injected as the library's default scheduler.
73*c217d954SCole Faust
74*c217d954SCole Faust@section architecture__algorithms Algorithms
75*c217d954SCole Faust
76*c217d954SCole FaustAll computer vision algorithms in this library have been implemented following the [OpenVX 1.1 specifications](https://www.khronos.org/registry/vx/specs/1.1/html/). Please refer to the Khronos documentation for more information.
77*c217d954SCole Faust
78*c217d954SCole Faust@section architecture_images_tensors Images, padding, border modes and tensors
79*c217d954SCole Faust
80*c217d954SCole FaustMost kernels and functions in the library process images, however, in order to be future proof most of the kernels actually accept tensors. See below for more information about how they are related.
81*c217d954SCole Faust
82*c217d954SCole Faust@attention Each memory object can be written by only one kernel, however it can be read by several kernels. Writing to the same object from several kernels will result in undefined behavior. The kernel writing to an object must be configured before the kernel(s) reading from it.
83*c217d954SCole Faust
84*c217d954SCole Faust@subsection architecture_images_tensors_padding_and_border Padding and border modes
85*c217d954SCole Faust
86*c217d954SCole FaustSeveral algorithms require a neighborhood around the current pixel to compute it's value. This means the algorithm will not be able to process the borders of the image unless you give it more information about how those border pixels should be processed. The @ref BorderMode enum is used for this purpose.
87*c217d954SCole Faust
88*c217d954SCole FaustYou have 3 types of @ref BorderMode :
89*c217d954SCole Faust
90*c217d954SCole Faust- @ref BorderMode::UNDEFINED : Neighbor pixels outside of the image are treated as undefined. As a result all the pixels which are on the border will have a value which is undefined.
91*c217d954SCole Faust- @ref BorderMode::REPLICATE : Neighbor pixels outside of the image are treated as having the same value as the closest valid pixel.
92*c217d954SCole Faust- @ref BorderMode::CONSTANT : Neighbor pixels outside of the image are treated as having the same constant value. (The user can choose what this value should be).
93*c217d954SCole Faust
94*c217d954SCole FaustMoreover both OpenCL and Arm® Neon™ use vector loads and stores instructions to access the data in buffers, so in order to avoid having special cases to handle for the borders all the images and tensors used in this library must be padded.
95*c217d954SCole Faust
96*c217d954SCole Faust@subsubsection architecture_images_tensors_padding Padding
97*c217d954SCole Faust
98*c217d954SCole FaustThere are different ways padding can be calculated:
99*c217d954SCole Faust
100*c217d954SCole Faust- Accurate padding:
101*c217d954SCole Faust
102*c217d954SCole Faust@note It's important to call allocate @b after the function is configured: if the image / tensor is already allocated then the function will shrink its execution window instead of increasing the padding. (See below for more details).
103*c217d954SCole Faust
104*c217d954SCole Faust- Manual padding / no padding / auto padding: You can allocate your images / tensors up front (before configuring your functions). In that case the function will use whatever padding is available and will shrink its execution window if there isn't enough padding available (which translates into a smaller valid region for the output). See also @ref architecture_images_tensors_valid_region).
105*c217d954SCole FaustIf you don't want to manually set the padding but still want to allocate your objects upfront then you can use auto_padding. It guarantees that the allocation will have enough padding to run any of the provided functions.
106*c217d954SCole Faust
107*c217d954SCole Faust@code{.cpp}
108*c217d954SCole FaustImage       src{}, dst{};
109*c217d954SCole FaustNEScale     scale{};
110*c217d954SCole Faust
111*c217d954SCole Faust// Create an empty grayscale 640x480 image
112*c217d954SCole Faustsrc.allocator()->init(TensorInfo(640, 480, Format::U8));
113*c217d954SCole Faust
114*c217d954SCole Faustconstexpr int scale_factor = 2;
115*c217d954SCole FaustTensorInfo dst_tensor_info(src.info()->dimension(0) / scale_factor, src.info()->dimension(1) / scale_factor,
116*c217d954SCole Faust                           Format::U8);
117*c217d954SCole Faust
118*c217d954SCole Faust// Configure the destination image
119*c217d954SCole Faustdst.allocator()->init(dst_tensor_info);
120*c217d954SCole Faust
121*c217d954SCole Faust// Configure Scale function object:
122*c217d954SCole Faustscale.configure(&src, &dst, ScaleKernelInfo{
123*c217d954SCole Faust            InterpolationPolicy::NEAREST_NEIGHBOR,
124*c217d954SCole Faust            BorderMode::UNDEFINED,
125*c217d954SCole Faust            PixelValue(),
126*c217d954SCole Faust            SamplingPolicy::CENTER,
127*c217d954SCole Faust            false
128*c217d954SCole Faust});
129*c217d954SCole Faust
130*c217d954SCole Faust// Allocate all the images
131*c217d954SCole Faustsrc.allocator()->allocate();
132*c217d954SCole Faustdst.allocator()->allocate();
133*c217d954SCole Faust// Fill the input image with the content of the PPM image if a filename was provided:
134*c217d954SCole Faustfill_image(src);
135*c217d954SCole Faust
136*c217d954SCole Faust// Run the scale operation:
137*c217d954SCole Faustscale.run();
138*c217d954SCole Faust@endcode
139*c217d954SCole Faust
140*c217d954SCole FaustThe full example is provided in examples/neon_scale.cpp
141*c217d954SCole Faust
142*c217d954SCole Faust@warning Some kernels need up to 3 neighbor values to calculate the value of a given pixel. Therefore, to be safe, we use a 4-pixel padding all around the image. In addition, some kernels read and write up to 32 pixels at the same time. To cover that case as well we add an extra 32 pixels of padding at the end of each row. As a result auto padded buffers waste a lot of memory and are less cache friendly. It is therefore recommended to use accurate padding or manual padding wherever possible.
143*c217d954SCole Faust
144*c217d954SCole Faust@subsubsection architecture_images_tensors_valid_region Valid regions
145*c217d954SCole Faust
146*c217d954SCole FaustSome kernels (like edge detectors for example) need to read values of neighboring pixels to calculate the value of a given pixel, it is therefore not possible to calculate the values of the pixels on the edges.
147*c217d954SCole Faust
148*c217d954SCole FaustAnother case is: if a kernel processes 8 pixels per iteration and the image's dimensions are not a multiple of 8 and not enough padding is available then the kernel will not be able to process the pixels near the right edge. As a result these pixels will be left undefined.
149*c217d954SCole Faust
150*c217d954SCole FaustIn order to know which pixels have been calculated, each kernel sets a valid region for each output image or tensor. See also @ref TensorInfo::valid_region(), @ref ValidRegion
151*c217d954SCole Faust
152*c217d954SCole Faust@subsection architecture_images_tensors_tensors Tensors
153*c217d954SCole Faust
154*c217d954SCole FaustTensors are multi-dimensional arrays with a maximum of @ref Coordinates::num_max_dimensions dimensions.
155*c217d954SCole Faust
156*c217d954SCole FaustDepending on the number of dimensions tensors can be interpreted as various objects. A scalar can be represented as a zero-dimensional tensor and a vector of numbers can be represented as an one-dimensional tensor. Further, an image is actually just a 2D tensor, a 3D tensor can be seen as an array of images and a 4D tensor as a 2D array of images, etc.
157*c217d954SCole Faust
158*c217d954SCole Faust@note Most algorithms process images (i.e a 2D slice of the tensor), therefore only padding along the X and Y axes is required (2D slices can be stored contiguously in memory).
159*c217d954SCole Faust
160*c217d954SCole Faust@subsection architecture_images_tensors_description_conventions Images and Tensors description conventions
161*c217d954SCole Faust
162*c217d954SCole FaustImage objects are defined by a @ref Format and dimensions expressed as [width, height, batch]
163*c217d954SCole Faust
164*c217d954SCole FaustTensors are defined by a @ref DataType plus a number of channels (Always expected to be 1 for now) and their dimensions are expressed as [width, height, feature_maps, batch].
165*c217d954SCole Faust
166*c217d954SCole FaustIn other words, the lower three dimensions of a tensor specify a single input in [width, height, feature_maps], while any other specified dimension represents a batch in the appropriate dimension space.
167*c217d954SCole FaustFor example, a tensor with dimensions [128, 128, 64, 16] represents a 1D batch space with 16 batches of 128 elements in width and height and 64 feature maps each.
168*c217d954SCole FaustEach kernel specifies the expected layout of each of its tensors in its documentation.
169*c217d954SCole Faust
170*c217d954SCole Faust@note Unless specified otherwise in the kernel's or function's documentation all tensors and images parameters passed must have identical dimensions.
171*c217d954SCole Faust
172*c217d954SCole Faust@note Unless specified otherwise in the kernel's or function's documentation the number of channels for tensors is expected to be 1 (For images, the number of channels is inferred from the @ref Format).
173*c217d954SCole Faust
174*c217d954SCole Faust@attention Regardless of the @ref DataType used by a tensor the @ref ITensor::buffer() method will always return a uint8_t pointer, and all the metadata in @ref TensorInfo will be expressed in bytes. It is the user's responsibility to cast the pointer to the correct type.
175*c217d954SCole Faust
176*c217d954SCole FaustFor example, to read the element located at the coordinates (x,y) of a float tensor:
177*c217d954SCole Faust
178*c217d954SCole Faust@code{.cpp}
179*c217d954SCole Faustfloat value = *reinterpret_cast<float*>(input.buffer() + input.info()->offset_element_in_bytes(Coordinates(x,y)));
180*c217d954SCole Faust@endcode
181*c217d954SCole Faust
182*c217d954SCole Faust@subsection architecture_images_tensors_working_with_objects Working with Images and Tensors using iterators
183*c217d954SCole Faust
184*c217d954SCole FaustThe library provides some iterators to access objects' data.
185*c217d954SCole FaustIterators are created by associating a data object (An image or a tensor for example) with an iteration window.
186*c217d954SCole Faust
187*c217d954SCole FaustIteration windows are defined by an array of dimensions, each of which consists of a start, end and step.
188*c217d954SCole Faust
189*c217d954SCole FaustThe @ref execute_window_loop function takes an execution window, a lambda function and one or more iterators.
190*c217d954SCole FaustIt will iterate through every element of the execution window and for each element it will update the iterators accordingly and call the lambda function.
191*c217d954SCole Faust
192*c217d954SCole FaustHere are a couple of examples of how to use the iterators to fill / read tensors:
193*c217d954SCole Faust
194*c217d954SCole Faust@snippet examples/neon_copy_objects.cpp Copy objects example
195*c217d954SCole Faust
196*c217d954SCole Faust@subsection architecture_images_tensors_sub_tensors Sub-tensors
197*c217d954SCole Faust
198*c217d954SCole FaustSub-tensors are aliases to existing Tensors, as a result creating a sub-tensor does not result in any underlying memory allocation.
199*c217d954SCole Faust
200*c217d954SCole FaustSub-tensors can be used to access a sub-set of the parent tensor, something that can be useful in case different operations need to be performed on different parts of a tensor.
201*c217d954SCole Faust
202*c217d954SCole FaustMoreover, sub-tensors can be used to perform zero copy tensor concatenation.
203*c217d954SCole Faust
204*c217d954SCole FaustThe API for creating a sub-tensor is the following:
205*c217d954SCole Faust@code{.cpp}
206*c217d954SCole FaustSubTensor(ITensor *parent, const TensorShape &tensor_shape, const Coordinates &coords)
207*c217d954SCole Faust@endcode
208*c217d954SCole Faust
209*c217d954SCole FaustWhere \a parent is the parent tensor which we want to create an alias for, \a tensor_shape is the shape of the sub-tensor and \a coords are the starting indexing coordinates of the sub-tensor within the parent tensor.
210*c217d954SCole Faust
211*c217d954SCole Faust@note Two sub-tensor concrete classes for different targets are currently supported : @ref CLSubTensor and @ref SubTensor
212*c217d954SCole Faust
213*c217d954SCole Faust@warning Limitation of the sub-tensor is that it cannot be extracted spatially, meaning sub-tensors should have the same width and height as the parent tensor. The main reasons for this is the fact that individual kernels might need to operate with a step size that is not a multiple of the sub-tensor spatial dimension. This could lead to elements being overwritten by different kernels operating on different sub-tensors of the same underlying tensor.
214*c217d954SCole Faust
215*c217d954SCole Faust@section architecture_memory_manager MemoryManager
216*c217d954SCole Faust
217*c217d954SCole Faust@ref IMemoryManager is a memory managing interface that can be used to reduce the memory requirements of a given pipeline by recycling temporary buffers.
218*c217d954SCole Faust
219*c217d954SCole Faust@subsection architecture_memory_manager_component MemoryGroup, MemoryPool and MemoryManager Components
220*c217d954SCole Faust
221*c217d954SCole Faust@subsubsection architecture_memory_manager_component_memory_group MemoryGroup
222*c217d954SCole Faust
223*c217d954SCole Faust@ref IMemoryGroup defines the memory managing granularity.
224*c217d954SCole Faust
225*c217d954SCole FaustMemoryGroup binds a number of objects to a bucket of memory requirements that need to be fulfilled in order for an operation or list of operations to be executed.
226*c217d954SCole Faust
227*c217d954SCole FaustRequesting backing memory for a specific group can be done using @ref IMemoryGroup::acquire and releasing the memory back using @ref IMemoryGroup::release.
228*c217d954SCole Faust
229*c217d954SCole Faust@subsubsection architecture_memory_manager_component_memory_pool MemoryPool
230*c217d954SCole Faust
231*c217d954SCole Faust@ref IMemoryPool defines a pool of memory that can be used to provide backing memory to a memory group.
232*c217d954SCole Faust
233*c217d954SCole Faust@note @ref BlobMemoryPool is currently implemented which models the memory requirements as a vector of distinct memory blobs.
234*c217d954SCole Faust
235*c217d954SCole Faust@subsubsection architecture_memory_manager_component_memory_manager_components MemoryManager Components
236*c217d954SCole Faust
237*c217d954SCole Faust@ref IMemoryManager consists of two components:
238*c217d954SCole Faust- @ref ILifetimeManager that keeps track of the lifetime of the registered objects of the memory groups and given an @ref IAllocator creates an appropriate memory pool that fulfils the memory requirements of all the registered memory groups.
239*c217d954SCole Faust- @ref IPoolManager that safely manages the registered memory pools.
240*c217d954SCole Faust
241*c217d954SCole Faust@note @ref BlobLifetimeManager is currently implemented which models the memory requirements as a vector of distinct memory blobs.
242*c217d954SCole Faust
243*c217d954SCole Faust@subsection architecture_memory_manager_working_with_memory_manager Working with the Memory Manager
244*c217d954SCole FaustUsing a memory manager to reduce the memory requirements of a pipeline can be summed in the following steps:
245*c217d954SCole Faust
246*c217d954SCole FaustInitially a memory manager must be set-up:
247*c217d954SCole Faust@code{.cpp}
248*c217d954SCole FaustAllocator  allocator{};                                                               // Create an allocator to use for the backing memory allocation
249*c217d954SCole Faustauto lifetime_mgr  = std::make_shared<BlobLifetimeManager>();                         // Create Lifetime Manager
250*c217d954SCole Faustauto pool_mgr      = std::make_shared<PoolManager>();                                 // Create Pool Manager
251*c217d954SCole Faustauto mm            = std::make_shared<MemoryManagerOnDemand>(lifetime_mgr, pool_mgr); // Create Memory Manager
252*c217d954SCole Faust@endcode
253*c217d954SCole Faust
254*c217d954SCole FaustOnce done, memory groups can be registered to use the memory manager:
255*c217d954SCole Faust@code{.cpp}
256*c217d954SCole FaustMemoryGroup memory_group(mm); // Create a memory group and set the memory manager to use
257*c217d954SCole Faust@endcode
258*c217d954SCole Faust
259*c217d954SCole Faust@note If a memory manager is not specified then all allocation will be immediate instead of deferred through the memory manager.
260*c217d954SCole Faust
261*c217d954SCole FaustNext step is to set objects to be managed by the memory group. It is important though to note that the lifetime of an object is tracked from the @ref MemoryGroup::manage() and the @ref TensorAllocator::allocate calls.
262*c217d954SCole Faust@ref MemoryGroup::manage flags that the object will be needed starting now and when @ref TensorAllocator::allocate is called it signals the end of the object lifetime.
263*c217d954SCole Faust@code{.cpp}
264*c217d954SCole FaustTensor tmp1, tmp2, tmp3;            // Create example tensors
265*c217d954SCole Faustmemory_group.manage(&tmp1);         // Start managing object tmp1 and start its lifetime
266*c217d954SCole Faustmemory_group.manage(&tmp2);         // Start managing object tmp2 and start its lifetime
267*c217d954SCole Faust
268*c217d954SCole Faustoperation1.configure(&tmp1, &tmp2); // Configure a function/kernel using tmp1 and tmp2
269*c217d954SCole Faust
270*c217d954SCole Fausttmp1.allocator()->allocate();       // Flag that the lifetime of object tmp1 has ended
271*c217d954SCole Faust
272*c217d954SCole Faustmemory_group.manage(&tmp3);         // Start managing object tmp3 and start its lifetime
273*c217d954SCole Faust
274*c217d954SCole Faustoperation2.configure(&tmp2, &tmp3); // Configure a function/kernel using tmp2 and tmp3
275*c217d954SCole Faust
276*c217d954SCole Fausttmp2.allocator()->allocate();       // Flag that the lifetime of object tmp2 has ended
277*c217d954SCole Fausttmp3.allocator()->allocate();       // Flag that the lifetime of object tmp3 has ended
278*c217d954SCole Faust@endcode
279*c217d954SCole Faust
280*c217d954SCole Faust@warning The configuration step should be done sequentially by a single thread so that all the lifetimes are captured correctly.
281*c217d954SCole Faust
282*c217d954SCole FaustWhen configuration of all the operations is finished then the memory manager have to be populated:
283*c217d954SCole Faust@code{.cpp}
284*c217d954SCole Faustmm->populate(&allocator), 2 /* num_pools */); // Populate memory manager pools
285*c217d954SCole Faust@endcode
286*c217d954SCole Faust
287*c217d954SCole FaustFinally, during execution of the pipeline the memory of the appropriate memory group should be requested before running:
288*c217d954SCole Faust@code{.cpp}
289*c217d954SCole Faustmemory_group.acquire(); // Request memory for the group
290*c217d954SCole Faust
291*c217d954SCole Faustoperation1.run();       // Run operation1
292*c217d954SCole Faustoperation2.run();       // Run operation2
293*c217d954SCole Faust
294*c217d954SCole Faustmemory_group.release(); // Release memory so that it can be reused
295*c217d954SCole Faust@endcode
296*c217d954SCole Faust@note Execution of a pipeline can be done in a multi-threading environment as memory acquisition/release are thread safe.
297*c217d954SCole Faust@note If you are handling sensitive data and it's required to zero out the memory buffers before freeing, make sure to also zero out the intermediate buffers. You can access the buffers through the memory group's mappings.
298*c217d954SCole Faust
299*c217d954SCole Faust@subsection architecture_memory_manager_function_support Function support
300*c217d954SCole Faust
301*c217d954SCole FaustMost of the library's function have been ported to use @ref IMemoryManager for their internal temporary buffers.
302*c217d954SCole Faust
303*c217d954SCole FaustIf that is the case, a memory manager can be passed to them during construction to reuse memory among these functions.
304*c217d954SCole Faust@code{.cpp}
305*c217d954SCole Faust// Setup Memory Manager
306*c217d954SCole FaustCLBufferAllocator  allocator{};                                                       // Create an allocator to use for the backing memory allocation
307*c217d954SCole Faustauto lifetime_mgr  = std::make_shared<BlobLifetimeManager>();                         // Create Lifetime Manager
308*c217d954SCole Faustauto pool_mgr      = std::make_shared<PoolManager>();                                 // Create Pool Manager
309*c217d954SCole Faustauto mm            = std::make_shared<MemoryManagerOnDemand>(lifetime_mgr, pool_mgr); // Create Memory Manager
310*c217d954SCole Faust
311*c217d954SCole Faust// Create two convolution layers and use the memory manager to manager their internal temporary buffers
312*c217d954SCole FaustCLConvolutionLayer conv1(mm), conv2(mm);
313*c217d954SCole Faust
314*c217d954SCole Faust// Configure layers
315*c217d954SCole Faustconv1.configure(...);
316*c217d954SCole Faustconv2.configure(...);
317*c217d954SCole Faust
318*c217d954SCole Faust// Populate memory manager
319*c217d954SCole Faustmm->populate(&allocator), 1 /* num_pools */); // Populate memory manager pools
320*c217d954SCole Faust
321*c217d954SCole Faust// Run layers (Memory will be recycled for internal buffers for conv1 and conv2
322*c217d954SCole Faustconv1.run();
323*c217d954SCole Faustconv2.run();
324*c217d954SCole Faust@endcode
325*c217d954SCole Faust
326*c217d954SCole Faust@section architecture_import_memory Import Memory Interface
327*c217d954SCole Faust
328*c217d954SCole FaustThe implemented @ref TensorAllocator and @ref CLTensorAllocator objects provide an interface capable of importing existing memory to a tensor as backing memory.
329*c217d954SCole Faust
330*c217d954SCole FaustA simple Arm® Neon™ example can be the following:
331*c217d954SCole Faust@code{.cpp}
332*c217d954SCole Faust// External backing memory
333*c217d954SCole Faustvoid* external_ptr = ...;
334*c217d954SCole Faust
335*c217d954SCole Faust// Create and initialize tensor
336*c217d954SCole FaustTensor tensor;
337*c217d954SCole Fausttensor.allocator()->init(tensor_info);
338*c217d954SCole Faust
339*c217d954SCole Faust// Import existing pointer as backing memory
340*c217d954SCole Fausttensor.allocator()->import_memory(external_ptr);
341*c217d954SCole Faust@endcode
342*c217d954SCole Faust
343*c217d954SCole FaustIt is important to note the following:
344*c217d954SCole Faust- Ownership of the backing memory is not transferred to the tensor itself.
345*c217d954SCole Faust- The tensor mustn't be memory managed.
346*c217d954SCole Faust- Padding requirements should be accounted by the client code. In other words, if padding is required by the tensor after the function configuration step, then the imported backing memory should account for it. Padding can be checked through the @ref TensorInfo::padding() interface.
347*c217d954SCole Faust
348*c217d954SCole Faust@section architecture_opencl_tuner OpenCL Tuner
349*c217d954SCole Faust
350*c217d954SCole FaustOpenCL kernels when dispatched to the GPU take two arguments:
351*c217d954SCole Faust- The Global Workgroup Size (GWS): That's the number of times to run an OpenCL kernel to process all the elements we want to process.
352*c217d954SCole Faust- The Local Workgroup Size (LWS): That's the number of elements we want to run in parallel on a GPU core at a given point in time.
353*c217d954SCole Faust
354*c217d954SCole FaustThe LWS can be required by an algorithm (For example if it contains memory barriers or uses local memory) but it can also be used for performance reasons to tweak the performance of a kernel: the execution time of the overall kernel might vary significantly depending on how the GWS is broken down.
355*c217d954SCole Faust
356*c217d954SCole FaustHowever, there is no universal rule regarding which LWS is best for a given kernel, so instead we created the @ref CLTuner.
357*c217d954SCole Faust
358*c217d954SCole FaustWhen the @ref CLTuner is enabled ( Target = 2 for the graph examples), the first time an OpenCL kernel is executed the Compute Library will try to run it with a variety of LWS values and will remember which one performed best for subsequent runs. At the end of the run the @ref graph::Graph will try to save these tuning parameters to a file.
359*c217d954SCole Faust
360*c217d954SCole FaustHowever this process takes quite a lot of time, which is why it cannot be enabled all the time. @ref CLTuner supports three modes of tuning with different trade-offs between the time taken to tune and the kernel execution time achieved using the best LWS found. In the Exhaustive mode, it searches all the supported values of LWS. This mode takes the longest time to tune and is the most likely to find the optimal LWS. Normal mode searches a subset of LWS values to yield a good approximation of the optimal LWS. It takes less time to tune than Exhaustive mode. Rapid mode takes the shortest time to tune and finds an LWS value that is at least as good or better than the default LWS value. The mode affects only the search for the optimal LWS and has no effect when the LWS value is imported from a file.
361*c217d954SCole Faust
362*c217d954SCole FaustBut, when the @ref CLTuner is disabled ( Target = 1 for the graph examples), the @ref graph::Graph will try to reload the file containing the tuning parameters, then for each executed kernel the Compute Library will use the fine tuned LWS if it was present in the file or use a default LWS value if it's not.
363*c217d954SCole Faust
364*c217d954SCole Faust@section architecture_cl_queue_priorities OpenCL Queue Priorities
365*c217d954SCole Faust
366*c217d954SCole FaustOpenCL 2.1 exposes the `cl_khr_priority_hints` extensions that if supported by an underlying implementation allows the user to specify priority hints to the created command queues.
367*c217d954SCole FaustIs important to note that this does not specify guarantees or the explicit scheduling behavior, this is something that each implementation needs to expose.
368*c217d954SCole Faust
369*c217d954SCole FaustIn some cases, priority queues can be used when there is an implicit internal priority between graphics and compute queues and thus allow some level of priority control between them.
370*c217d954SCole FaustAt the moment three priority level can be specified:
371*c217d954SCole Faust- CL_QUEUE_PRIORITY_HIGH_KHR
372*c217d954SCole Faust- CL_QUEUE_PRIORITY_MED_KHR
373*c217d954SCole Faust- CL_QUEUE_PRIORITY_LOW_KHR
374*c217d954SCole Faust
375*c217d954SCole FaustCompute Library allows extraction of the internal OpenCL queue or the ability to inject directly a user-defined queue to the @ref CLScheduler.
376*c217d954SCole FaustThis way the user can utilize this extension to define priorities between the queues and setup the OpenCL scheduler mechanism to utilize them.
377*c217d954SCole Faust
378*c217d954SCole Faust@code{.cpp}
379*c217d954SCole Faustcl_queue_properties queue_properties[] = {CL_QUEUE_PRIORITY_KHR, CL_QUEUE_PRIORITY_HIGH_KHR, 0};
380*c217d954SCole Faustcl_command_queue priority_queue = clCreateCommandQueueWithProperties(ctx, dev, queue_properties, &error);
381*c217d954SCole FaustCLScheduler::get().set_queue(::cl::CommandQueue(priority_queue));
382*c217d954SCole Faust@endcode
383*c217d954SCole Faust
384*c217d954SCole Faust@section architecture_weights_manager Weights Manager
385*c217d954SCole Faust
386*c217d954SCole Faust@ref IWeightsManager is a weights managing interface that can be used to reduce the memory requirements of a given pipeline by reusing transformed weights across multiple function executions.
387*c217d954SCole Faust@ref IWeightsManager is responsible for managing weight tensors alongside with their transformations.
388*c217d954SCole Faust@ref ITransformWeights provides an interface for running the desired transform function. This interface is used by the weights manager.
389*c217d954SCole Faust
390*c217d954SCole Faust@subsection architecture_weights_manager_working_with_weights_manager Working with the Weights Manager
391*c217d954SCole FaustFollowing is a simple example that uses the weights manager:
392*c217d954SCole Faust
393*c217d954SCole FaustInitially a weights manager must be set-up:
394*c217d954SCole Faust@code{.cpp}
395*c217d954SCole Faustauto  wm = std::make_shared<IWeightsManager>(); // Create a weights manager
396*c217d954SCole Faust@endcode
397*c217d954SCole Faust
398*c217d954SCole FaustOnce done, weights can be managed, configured and run:
399*c217d954SCole Faust@code{.cpp}
400*c217d954SCole Faustwm->manage(weights); // Manage the weights
401*c217d954SCole Faustwm->acquire(weights, &_reshape_weights_managed_function); // Acquire the address of the transformed weights based on the transform function
402*c217d954SCole Faustwm->run(weights, &_reshape_weights_managed_function);     // Run the transpose function
403*c217d954SCole Faust@endcode
404*c217d954SCole Faust
405*c217d954SCole Faust@section programming_model Programming Model
406*c217d954SCole Faust@subsection programming_model_functions Functions
407*c217d954SCole Faust
408*c217d954SCole FaustFunctions will automatically allocate the temporary buffers mentioned above, and will automatically multi-thread kernels' executions using the very basic scheduler described in the previous section.
409*c217d954SCole Faust
410*c217d954SCole FaustSimple functions only call a single kernel (e.g NEConvolution3x3), while more complex ones consist of several kernels pipelined together (e.g @ref NEFullyConnectedLayer ). Check their documentation to find out which kernels are used by each function.
411*c217d954SCole Faust
412*c217d954SCole Faust@code{.cpp}
413*c217d954SCole Faust//Create a function object:
414*c217d954SCole FaustMyFunction function;
415*c217d954SCole Faust// Initialize the function with the input/output and options you want to use:
416*c217d954SCole Faustfunction.configure( input, output, option0, option1);
417*c217d954SCole Faust// Execute the function:
418*c217d954SCole Faustfunction.run();
419*c217d954SCole Faust@endcode
420*c217d954SCole Faust
421*c217d954SCole Faust@warning The Compute Library requires Arm® Mali™ OpenCL DDK r8p0 or higher (OpenCL kernels are compiled using the -cl-arm-non-uniform-work-group-size flag)
422*c217d954SCole Faust
423*c217d954SCole Faust@note All OpenCL functions and objects in the runtime library use the command queue associated with CLScheduler for all operations, a real implementation would be expected to use different queues for mapping operations and kernels in order to reach a better GPU utilization.
424*c217d954SCole Faust
425*c217d954SCole Faust@subsection programming_model_scheduler OpenCL Scheduler
426*c217d954SCole Faust
427*c217d954SCole FaustThe Compute Library runtime uses a single command queue and context for all the operations.
428*c217d954SCole Faust
429*c217d954SCole FaustThe user can get / set this context and command queue through CLScheduler's interface.
430*c217d954SCole Faust
431*c217d954SCole FaustThe user can get / set the target GPU device through the CLScheduler's interface.
432*c217d954SCole Faust
433*c217d954SCole Faust@attention Make sure the application is using the same context as the library as in OpenCL it is forbidden to share objects across contexts. This is done by calling @ref CLScheduler::init() or @ref CLScheduler::default_init() at the beginning of your application.
434*c217d954SCole Faust
435*c217d954SCole Faust@attention Make sure the scheduler's target is not changed after function classes are created.
436*c217d954SCole Faust
437*c217d954SCole Faust@subsection programming_model__events_sync OpenCL events and synchronization
438*c217d954SCole Faust
439*c217d954SCole FaustIn order to block until all the jobs in the CLScheduler's command queue are done executing the user can call @ref CLScheduler::sync() or create a sync event using @ref CLScheduler::enqueue_sync_event()
440*c217d954SCole Faust
441*c217d954SCole Faust@subsection programming_model_cl_neon OpenCL / Arm® Neon™ interoperability
442*c217d954SCole Faust
443*c217d954SCole FaustYou can mix OpenCL and Arm® Neon™ kernels and functions. However it is the user's responsibility to handle the mapping/unmapping of OpenCL objects.
444*c217d954SCole Faust
445*c217d954SCole Faust@section architecture_experimental Experimental Features
446*c217d954SCole Faust
447*c217d954SCole Faust@subsection architecture_experimental_run_time_context Run-time Context
448*c217d954SCole Faust
449*c217d954SCole FaustSome of the Compute Library components are modelled as singletons thus posing limitations to supporting some use-cases and ensuring a more client-controlled API.
450*c217d954SCole FaustThus, we are introducing an aggregate service interface @ref IRuntimeContext which will encapsulate the services that the singletons were providing and allow better control of these by the client code.
451*c217d954SCole FaustRun-time context encapsulates a list of mechanisms, some of them are: scheduling, memory management, kernel caching and others.
452*c217d954SCole FaustConsequently, this will allow finer control of these services among pipelines when Compute Library is integrated in higher level frameworks.
453*c217d954SCole Faust
454*c217d954SCole FaustThis feature introduces some changes to our API.
455*c217d954SCole FaustAll the kernels/functions will now accept a Runtime Context object which will allow the function to use the mentioned services.
456*c217d954SCole Faust
457*c217d954SCole FaustFinally, we will try to adapt our code-base progressively to use the new mechanism but will continue supporting the legacy mechanism to allow a smooth transition. Changes will apply to all our backends: Neon™ and OpenCL.
458*c217d954SCole Faust
459*c217d954SCole Faust@subsection architecture_experimental_clvk CLVK
460*c217d954SCole Faust
461*c217d954SCole FaustCompute Library offers experimental support for [CLVK](https://github.com/kpet/clvk). If CLVK is installed in the system, users can select the backend when running a graph example with --target=clvk.
462*c217d954SCole FaustIf no target is specified and more that one OpenCL implementations are present, Compute Library will pick the first available.
463*c217d954SCole Faust
464*c217d954SCole Faust@section architecture_experimental_api Experimental Application Programming Interface
465*c217d954SCole Faust
466*c217d954SCole Faust@subsection architecture_experimental_api_overview Overview
467*c217d954SCole Faust
468*c217d954SCole FaustIn this section we present Compute Library's experimental application programming interface (API) architecture along with
469*c217d954SCole Fausta detailed explanation of its components. Compute Library's API consists of multiple high-level operators and
470*c217d954SCole Fausteven more internally distinct computational blocks that can be executed on a command queue.
471*c217d954SCole FaustOperators can be bound to multiple Tensor objects and executed concurrently or asynchronously if needed.
472*c217d954SCole FaustAll operators and associated objects are encapsulated in a Context-based mechanism, which provides all related
473*c217d954SCole Faustconstruction services.
474*c217d954SCole Faust
475*c217d954SCole Faust@subsection architecture_experimental_api_objects Fundamental objects
476*c217d954SCole Faust
477*c217d954SCole FaustCompute Library consists of a list of fundamental objects that are responsible for creating and orchestrating operator execution.
478*c217d954SCole FaustBelow we present these objects in more detail.
479*c217d954SCole Faust
480*c217d954SCole Faust@subsubsection architecture_experimental_api_objects_context AclContext or Context
481*c217d954SCole Faust
482*c217d954SCole FaustAclContext or Context acts as a central creational aggregate service. All other objects are bound to or created from a context.
483*c217d954SCole FaustIt provides, internally, common facilities such as
484*c217d954SCole Faust- allocators for object creation or backing memory allocation
485*c217d954SCole Faust- serialization interfaces
486*c217d954SCole Faust- any other modules that affect the construction of objects (e.g., program cache for OpenCL).
487*c217d954SCole Faust
488*c217d954SCole FaustThe followings sections will describe parameters that can be given on the creation of Context.
489*c217d954SCole Faust
490*c217d954SCole Faust@paragraph architecture_experimental_api_object_context_target AclTarget
491*c217d954SCole FaustContext is initialized with a backend target (AclTarget) as different backends might have a different subset of services.
492*c217d954SCole FaustCurrently the following targets are supported:
493*c217d954SCole Faust- #AclCpu: a generic CPU target that accelerates primitives through SIMD technologies
494*c217d954SCole Faust- #AclGpuOcl: a target for GPU acceleration using OpenCL
495*c217d954SCole Faust
496*c217d954SCole Faust@paragraph architecture_experimental_api_object_context_execution_mode AclExecutionMode
497*c217d954SCole FaustAn execution mode (AclExecutionMode) can be passed as an argument that affects the operator creation.
498*c217d954SCole FaustAt the moment the following execution modes are supported:
499*c217d954SCole Faust- #AclPreferFastRerun: Provides faster re-run. It can be used when the operators are expected to be executed multiple
500*c217d954SCole Fausttimes under the same execution context
501*c217d954SCole Faust- #AclPreferFastStart: Provides faster single execution. It can be used when the operators will be executed only once,
502*c217d954SCole Faustthus reducing their latency is important (Currently, it is not implemented)
503*c217d954SCole Faust
504*c217d954SCole Faust@paragraph architecture_experimental_api_object_context_capabilities AclTargetCapabilities
505*c217d954SCole FaustContext creation can also have a list of capabilities of hardware as one of its parameters. This is currently
506*c217d954SCole Faustavailable only for the CPU backend. A list of architecture capabilities can be passed to influence the selection
507*c217d954SCole Faustof the underlying kernels. Such capabilities can be for example the enablement of SVE or the dot product
508*c217d954SCole Faustinstruction explicitly.
509*c217d954SCole Faust@note The underlying hardware should support the given capability list.
510*c217d954SCole Faust
511*c217d954SCole Faust@paragraph architecture_experimental_api_object_context_allocator Allocator
512*c217d954SCole FaustAn allocator object that implements @ref AclAllocator can be passed to the Context upon its creation.
513*c217d954SCole FaustThis user-provided allocator will be used for allocation of any internal backing memory.
514*c217d954SCole Faust
515*c217d954SCole Faust@note To enable interoperability with OpenCL, additional entrypoints are provided
516*c217d954SCole Faustto extract (@ref AclGetClContext) or set (@ref AclSetClContext) the internal OpenCL context.
517*c217d954SCole Faust
518*c217d954SCole Faust@subsubsection architecture_experimental_api_objects_tensor AclTensor or Tensor
519*c217d954SCole Faust
520*c217d954SCole FaustA tensor is a mathematical object that can describe physical properties like matrices.
521*c217d954SCole FaustIt can be also considered a generalization of matrices that can represent arbitrary
522*c217d954SCole Faustdimensionalities. AclTensor is an abstracted interface that represents a tensor.
523*c217d954SCole Faust
524*c217d954SCole FaustAclTensor, in addition to the elements of the physical properties they represent,
525*c217d954SCole Faustalso contains the information such as shape, data type, data layout and strides to not only
526*c217d954SCole Faustfully describe the characteristics of the physical properties but also provide information
527*c217d954SCole Fausthow the object stored in memory should be traversed. @ref AclTensorDescriptor is a dedicated
528*c217d954SCole Faustobject to represent such metadata.
529*c217d954SCole Faust
530*c217d954SCole Faust@note The allocation of an AclTensor can be deferred until external memory is imported
531*c217d954SCole Faustas backing memory to accomplish a zero-copy context.
532*c217d954SCole Faust
533*c217d954SCole Faust@note To enable interoperability with OpenCL, additional entrypoints are provided
534*c217d954SCole Faustto extract (@ref AclGetClMem) the internal OpenCL memory object.
535*c217d954SCole Faust
536*c217d954SCole FaustAs Tensors can reside in different memory spaces, @ref AclMapTensor and @ref AclUnmapTensor entrypoints
537*c217d954SCole Faustare provided to map Tensors in and out of the host memory system, respectively.
538*c217d954SCole Faust
539*c217d954SCole Faust@subsubsection architecture_experimental_api_objects_queue AclQueue or Queue
540*c217d954SCole Faust
541*c217d954SCole FaustAclQueue acts as a runtime aggregate service. It provides facilities to schedule
542*c217d954SCole Faustand execute operators using underlying hardware. It also contains services like
543*c217d954SCole Fausttuning mechanisms (e.g., Local workgroup size tuning for OpenCL) that can be specified
544*c217d954SCole Faustduring operator execution.
545*c217d954SCole Faust
546*c217d954SCole Faust@note To enable interoperability with OpenCL, additional entrypoints are provided
547*c217d954SCole Faustto extract (@ref AclGetClQueue) or set (@ref AclSetClQueue) the internal OpenCL queue.
548*c217d954SCole Faust
549*c217d954SCole Faust@subsection architecture_experimental_api_internal Internal
550*c217d954SCole Faust@subsubsection architecture_experimental_api_internal_operator_vs_kernels Operators vs Kernels
551*c217d954SCole Faust
552*c217d954SCole FaustInternally, Compute Library separates the executable primitives in two categories: kernels and operators
553*c217d954SCole Faustwhich operate in a hierarchical way.
554*c217d954SCole Faust
555*c217d954SCole FaustA kernel is the lowest-level computation block whose responsibility is performing a task on a given group of data.
556*c217d954SCole FaustFor design simplicity, kernels computation does NOT involve the following:
557*c217d954SCole Faust
558*c217d954SCole Faust- Memory allocation: All the memory manipulation should be handled by the caller.
559*c217d954SCole Faust- Multi-threading: The information on how the workload can be split is provided by kernels,
560*c217d954SCole Faustso the caller can effectively distribute the workload to multiple threads.
561*c217d954SCole Faust
562*c217d954SCole FaustOn the other hand, operators combine one or multiple kernels to achieve more complex calculations.
563*c217d954SCole FaustThe responsibilities of the operators can be summarized as follows:
564*c217d954SCole Faust
565*c217d954SCole Faust- Defining the scheduling policy and dispatching of the underlying kernels to the hardware backend
566*c217d954SCole Faust- Providing information to the caller required by the computation (e.g., memory requirements)
567*c217d954SCole Faust- Allocation of any required auxiliary memory if it isn't given by its caller explicitly
568*c217d954SCole Faust
569*c217d954SCole Faust@subsection architecture_experimental_build_multi_isa Build multi-ISA binary
570*c217d954SCole Faust
571*c217d954SCole FaustSelecting multi_isa when building Compute Library, will create a library that contains all the supported ISA features.
572*c217d954SCole FaustBased on the CPU support, the appropriate kernel will be selected at runtime for execution. Currently this option is
573*c217d954SCole Faustonly supported with armv8.2-a as the base architecture.
574*c217d954SCole Faust
575*c217d954SCole Faust@subsection architecture_experimental_per_operator_build Per-operator build
576*c217d954SCole Faust
577*c217d954SCole FaustDependencies for all operators have been explicitly defined, this provides the ability to users to generate Compute Library
578*c217d954SCole Faustbinaries that include a user-defined list of operators.
579*c217d954SCole Faust
580*c217d954SCole FaustAn experimental flag 'build_config' has been introduced where a JSON configuration file can be provided and consumed.
581*c217d954SCole FaustAn example config looks like:
582*c217d954SCole Faust@code{.py}
583*c217d954SCole Faust{
584*c217d954SCole Faust    "operators": [
585*c217d954SCole Faust        "Activation",
586*c217d954SCole Faust        "DepthwiseConv2d",
587*c217d954SCole Faust        "Conv2d",
588*c217d954SCole Faust        "Permute",
589*c217d954SCole Faust        "Pool2d",
590*c217d954SCole Faust        "Reshape"
591*c217d954SCole Faust    ],
592*c217d954SCole Faust    "data_types": [
593*c217d954SCole Faust        "NHWC"
594*c217d954SCole Faust    ]
595*c217d954SCole Faust}
596*c217d954SCole Faust@endcode
597*c217d954SCole Faust
598*c217d954SCole FaustSupported data-types options are:
599*c217d954SCole Faust- "NHWC"
600*c217d954SCole Faust- "NCHW"
601*c217d954SCole Faust
602*c217d954SCole FaustThe list of supported operators can be found in filelist.json in the root of Compute Library repo.
603*c217d954SCole Faust
604*c217d954SCole Faust@subsection architecture_experimental_build_high_priority_operators Build high priority operators
605*c217d954SCole Faust
606*c217d954SCole FaustSelecting high_priority when building Compute Library, one new library will be created: libarm_compute_hp and
607*c217d954SCole Faustwill contain a selected subset of the libary operators. Currently the operators are staticly set.
608*c217d954SCole Faust
609*c217d954SCole Faust*/
610*c217d954SCole Faust} // namespace arm_compute
611