24.04
GpuLogicalKernel.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022, 2024 Arm Limited.
3
*
4
* SPDX-License-Identifier: MIT
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to
8
* deal in the Software without restriction, including without limitation the
9
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
* sell copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in all
14
* copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
* SOFTWARE.
23
*/
24
#ifndef ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_GPULOGICALKERNEL_H
25
#define ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_GPULOGICALKERNEL_H
26
27
#include "
src/dynamic_fusion/sketch/gpu/GpuKernelComponentGroup.h
"
28
#include "
src/dynamic_fusion/sketch/gpu/GpuKernelSourceCode.h
"
29
30
#include <memory>
31
#include <vector>
32
33
namespace
arm_compute
34
{
35
namespace
experimental
36
{
37
namespace
dynamic_fusion
38
{
39
/** Forward declaration */
40
class
GpuComponentServices;
41
class
IGpuKernelComponent;
42
43
/** A wrapper-processor of a @ref GpuKernelComponentGroup
44
* It adds the load (if any) and store components to the component group
45
* The @ref GpuLogicalKernel represents a complete kernel, and can proceed to invoke any kernel writer to generate the full kernel code
46
*/
47
class
GpuLogicalKernel
48
{
49
public
:
50
/** Constructor
51
*
52
* @param[in] services @ref GpuComponentServices to be used
53
* @param[in] components Component group from which this logical kernel is initialized
54
*/
55
explicit
GpuLogicalKernel
(
GpuComponentServices
*services,
GpuKernelComponentGroup
components);
// NOLINT
56
/** Allow instances of this class to be copy constructed */
57
GpuLogicalKernel
(
const
GpuLogicalKernel
&) =
default
;
58
/** Allow instances of this class to be copied */
59
GpuLogicalKernel
&
operator=
(
const
GpuLogicalKernel
&) =
default
;
60
/** Allow instances of this class to be move constructed */
61
GpuLogicalKernel
(
GpuLogicalKernel
&&) =
default
;
62
/** Allow instances of this class to be moved */
63
GpuLogicalKernel
&
operator=
(
GpuLogicalKernel
&&) =
default
;
64
/** Generate a @ref GpuKernelSourceCode */
65
GpuKernelSourceCode
write_kernel_code
();
66
67
private
:
68
GpuKernelComponentGroup
_comp_group{};
69
std::vector<std::unique_ptr<IGpuKernelComponent>> _store_components{};
70
};
71
}
// namespace dynamic_fusion
72
}
// namespace experimental
73
}
// namespace arm_compute
74
#endif // ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_GPULOGICALKERNEL_H
GpuKernelSourceCode.h
arm_compute::experimental::dynamic_fusion::GpuLogicalKernel::operator=
GpuLogicalKernel & operator=(const GpuLogicalKernel &)=default
Allow instances of this class to be copied.
GpuKernelComponentGroup.h
arm_compute::experimental::dynamic_fusion::GpuLogicalKernel
A wrapper-processor of a GpuKernelComponentGroup It adds the load (if any) and store components to th...
Definition:
GpuLogicalKernel.h:47
arm_compute::experimental::dynamic_fusion::GpuKernelSourceCode
Container of kernel code to be compiled and run in a GpuUnitWorkload.
Definition:
GpuKernelSourceCode.h:46
arm_compute::experimental::dynamic_fusion::GpuLogicalKernel::write_kernel_code
GpuKernelSourceCode write_kernel_code()
Generate a GpuKernelSourceCode.
Definition:
GpuLogicalKernel.cpp:46
arm_compute
Copyright (c) 2017-2024 Arm Limited.
Definition:
introduction.dox:24
arm_compute::experimental::dynamic_fusion::GpuComponentServices
Services that are used throughout the creation phase of workload code.
Definition:
GpuComponentServices.h:37
arm_compute::experimental::dynamic_fusion::GpuKernelComponentGroup
A group of gpu kernel components to be fused together PRECONDITIONS:
Definition:
GpuKernelComponentGroup.h:61
arm_compute::experimental::dynamic_fusion::GpuLogicalKernel::GpuLogicalKernel
GpuLogicalKernel(GpuComponentServices *services, GpuKernelComponentGroup components)
Constructor.
Definition:
GpuLogicalKernel.cpp:40
src
dynamic_fusion
sketch
gpu
GpuLogicalKernel.h
Generated on Mon Apr 29 2024 10:53:58 for Compute Library by
1.8.17