From 66f3d380cacb154748fdb2ac827da2377a2d1910 Mon Sep 17 00:00:00 2001 From: Adnan AlSinan Date: Mon, 10 Jul 2023 15:07:45 +0100 Subject: Port ClTemplateCast into Ckw Resolves COMPMID-6257 Signed-off-by: Adnan AlSinan Change-Id: I3e56ff1f1109924da02d0abd0354a3f1fa095ee7 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9914 Tested-by: Arm Jenkins Reviewed-by: Nikolaj Jensen Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- .../sketch/gpu/components/cl/ClComponentCast.cpp | 11 +++++++++-- src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.h | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src/dynamic_fusion/sketch/gpu/components/cl') diff --git a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.cpp b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.cpp index 007ba6380c..92933ae7a5 100644 --- a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.cpp +++ b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Arm Limited. + * Copyright (c) 2022-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -26,6 +26,7 @@ #include "arm_compute/core/Error.h" #include "src/core/CL/CLValidate.h" #include "src/dynamic_fusion/sketch/ArgumentPack.h" +#include "src/dynamic_fusion/sketch/gpu/ckw_driver/components/GpuCkwCast.h" #include "src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateCast.h" namespace arm_compute @@ -66,7 +67,8 @@ ClComponentCast::ClComponentCast(ComponentId id, const Attributes &attributes, const Settings &settings) : IGpuKernelComponent{ id, properties, tensors }, - _component_writer{ std::make_unique(id, tensors, attributes) } + _component_writer{ std::make_unique(id, tensors, attributes) }, + _ckw_driver{ std::make_unique(id, tensors, attributes) } { ARM_COMPUTE_UNUSED(attributes, settings); } @@ -77,6 +79,11 @@ const IGpuTemplateComponentWriter *ClComponentCast::template_writer() const { return _component_writer.get(); } + +const IGpuCkwComponentDriver *ClComponentCast::ckw_component_driver() const +{ + return _ckw_driver.get(); +} } // namespace dynamic_fusion } // namespace experimental } // namespace arm_compute diff --git a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.h b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.h index 84d6f07f16..174f9670b3 100644 --- a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.h +++ b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Arm Limited. + * Copyright (c) 2022-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -49,6 +49,7 @@ private: /** Forward declaration */ class ClTemplateCast; +class GpuCkwCast; class ClComponentCast final : public IGpuKernelComponent { @@ -117,6 +118,8 @@ public: ClComponentCast &operator=(ClComponentCast &&component) = default; /** Get template writer for the component */ const IGpuTemplateComponentWriter *template_writer() const override; + /** Get GPU kernel writer for the component */ + const IGpuCkwComponentDriver *ckw_component_driver() const override; /** Get component type */ GpuComponentType type() const override { @@ -125,6 +128,7 @@ public: private: std::unique_ptr _component_writer; + std::unique_ptr _ckw_driver; }; } // namespace dynamic_fusion } // namespace experimental -- cgit v1.2.1