24.04
Common.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023-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_CKW_DRIVER_COMPONENTS_UTILS_TYPE_CONVERTER_COMMON_H
25
#define ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_CKW_DRIVER_COMPONENTS_UTILS_TYPE_CONVERTER_COMMON_H
26
27
#include "
arm_compute/core/CoreTypes.h
"
28
#include "
arm_compute/core/ITensorInfo.h
"
29
#include "
arm_compute/core/TensorShape.h
"
30
31
#include "
src/dynamic_fusion/sketch/gpu/GpuKernelArgument.h
"
32
33
#include "compute_kernel_writer/include/ckw/TensorInfo.h"
34
#include "compute_kernel_writer/include/ckw/types/DataType.h"
35
#include "compute_kernel_writer/include/ckw/types/TensorComponentType.h"
36
#include "compute_kernel_writer/include/ckw/types/TensorStorageType.h"
37
38
namespace
arm_compute
39
{
40
namespace
experimental
41
{
42
namespace
dynamic_fusion
43
{
44
/** Convert the Compute Library data type to Compute Kernel Writer data type
45
*
46
* @param[in] dt The Compute Library data type
47
*
48
* @return the Compute Kernel Writer data type (ckw::DataType)
49
*/
50
ckw::DataType
to_ckw
(
DataType
dt
);
51
52
/** Convert the Compute Library tensor shape to Compute Kernel Writer tensor shape
53
*
54
* @param[in] shape The Compute Library tensor shape
55
*
56
* @return the Compute Kernel Writer tensor shape (ckw::TensorShape)
57
*/
58
ckw::TensorShape
to_ckw
(
const
TensorShape &
shape
);
59
60
/** Convert the Compute Library data layout to Compute Kernel Writer data layout
61
*
62
* @param[in] dl The Compute Library data layout
63
*
64
* @return the Compute Kernel Writer data layout (ckw::TensorDataLayout)
65
*/
66
ckw::TensorDataLayout
to_ckw
(
DataLayout
dl
);
67
68
/** Convert the Compute Library tensor info to Compute Kernel Writer tensor info
69
*
70
* @param[in] tensor_info The Compute Library tensor info
71
*
72
* @return the Compute Kernel Writer tensor info (ckw::TensorInfo)
73
*/
74
ckw::TensorInfo
to_ckw
(
const
ITensorInfo &
tensor_info
);
75
76
/** Convert the Compute Library tensor storage to Compute Kernel Writer tensor storage
77
*
78
* @param[in] storage The Compute Library tensor storage
79
*
80
* @return the Compute Kernel Writer tensor storate (ckw::TensorStorageType)
81
*/
82
ckw::TensorStorageType
to_ckw
(
const
TensorStorageType
&storage);
83
84
/** Convert the Compute Kernel Writer tensor component to Compute Library tensor component
85
*
86
* @param[in] component The Compute Kernel Writer tensor component
87
*
88
* @return the Compute Library tensor component
89
*/
90
TensorComponentType
from_ckw
(
const
ckw::TensorComponentType
&component);
91
92
/** Convert the Compute Kernel Writer tensor storage to Compute Library tensor storage
93
*
94
* @param[in] storage The Compute Kernel Writer tensor storage
95
*
96
* @return the Compute Library tensor storage
97
*/
98
TensorStorageType
from_ckw
(
const
ckw::TensorStorageType
&storage);
99
100
}
// namespace dynamic_fusion
101
}
// namespace experimental
102
}
// namespace arm_compute
103
#endif // ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_CKW_DRIVER_COMPONENTS_UTILS_TYPE_CONVERTER_COMMON_H
arm_compute::DataLayout
DataLayout
[DataLayout enum definition]
Definition:
CoreTypes.h:110
dl
DataLayout dl
Definition:
NEFuseBatchNormalizationKernel.cpp:50
ITensorInfo.h
acl::DataType
DataType
Definition:
Acl.hpp:482
arm_compute::test::validation::shape
shape
Definition:
DFT.cpp:115
CoreTypes.h
arm_compute::experimental::dynamic_fusion::to_ckw
ckw::DataType to_ckw(DataType dt)
Convert the Compute Library data type to Compute Kernel Writer data type.
Definition:
Common.cpp:32
dt
DataType dt
Definition:
NEBatchNormalizationLayerKernel.cpp:50
GpuKernelArgument.h
arm_compute::experimental::dynamic_fusion::TensorStorageType
TensorStorageType
Describe how the tensor runtime memory can be accessed.
Definition:
GpuKernelArgument.h:39
arm_compute
Copyright (c) 2017-2024 Arm Limited.
Definition:
introduction.dox:24
arm_compute::experimental::dynamic_fusion::from_ckw
TensorComponentType from_ckw(const ckw::TensorComponentType &component)
Convert the Compute Kernel Writer tensor component to Compute Library tensor component.
Definition:
Common.cpp:105
TensorShape.h
tensor_info
TensorInfo tensor_info
Associated tensor info.
Definition:
ClWorkloadRuntime.cpp:68
arm_compute::DataType
DataType
Available data types.
Definition:
CoreTypes.h:83
arm_compute::experimental::dynamic_fusion::TensorComponentType
TensorComponentType
Describe additional runtime information about the tensor.
Definition:
GpuKernelArgument.h:51
src
dynamic_fusion
sketch
gpu
ckw_driver
components
utils
type_converter
Common.h
Generated on Mon Apr 29 2024 10:53:58 for Compute Library by
1.8.17