aboutsummaryrefslogtreecommitdiff
path: root/src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2022-03-15 13:45:15 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2022-03-24 12:51:30 +0000
commitbd44caacf15a3b6b059af77e3345f79606067fea (patch)
treefc0235aee09359d9bc0cc9d2ca60b22c20abd148 /src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp
parent09adcc4142c95bdac66f02abd099ac4751e2f40f (diff)
downloadComputeLibrary-bd44caacf15a3b6b059af77e3345f79606067fea.tar.gz
[Dynamic Fusion] Implement build options generation
Resolves: COMPMID-5153 Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: Ic34cc1f0d092fafa7c2faa4dd705cf8f68eaf87e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7317 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp')
-rw-r--r--src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp b/src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp
index 430fafb89f..2d7b46616f 100644
--- a/src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp
+++ b/src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/components/ClStoreKernelComponents.cpp
@@ -61,6 +61,23 @@ std::string ClStoreBlockBoundaryAwareKernelComponent::get_component_code() const
)_";
}
+
+CLBuildOptions ClStoreBlockBoundaryAwareKernelComponent::generate_build_options() const
+{
+ auto t_dst_info = _blueprint->impl().get_kernel_argument_info(_blueprint->impl().get_dst_id());
+ auto tile_info = _blueprint->impl().get_tile_info();
+
+ CLBuildOptions build_opts{};
+
+ build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(t_dst_info->data_type()));
+ build_opts.add_option("-DM0=" + support::cpp11::to_string(tile_info.tile_dims.y()));
+ build_opts.add_option("-DN0=" + support::cpp11::to_string(tile_info.tile_dims.x()));
+ build_opts.add_option("-DPARTIAL_STORE_M0=" + support::cpp11::to_string(tile_info.boundaries.y() % tile_info.tile_dims.y()));
+ build_opts.add_option("-DPARTIAL_STORE_N0=" + support::cpp11::to_string(tile_info.boundaries.x() % tile_info.tile_dims.x()));
+
+ return build_opts;
+}
+
ClStoreBlockBoundaryAwareKernelComponent::TagLUT ClStoreBlockBoundaryAwareKernelComponent::allocate_vars(SharedVarTable &vtable) const
{
return {