From 4184e86508c3b1a744e9687d1112ba5f65f55eeb Mon Sep 17 00:00:00 2001 From: Adnan AlSinan Date: Mon, 10 Jul 2023 15:20:44 +0100 Subject: Port ClTemplateActivation into Ckw Resolves COMPMID-6256 Signed-off-by: Adnan AlSinan Change-Id: I48f6a9dfadefced20802bec1ab4ab843a9deba6e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9912 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: SiCong Li Benchmark: Arm Jenkins --- .../sketch/gpu/components/cl/ClComponentActivation.cpp | 9 ++++++++- .../sketch/gpu/components/cl/ClComponentActivation.h | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/dynamic_fusion/sketch/gpu/components') diff --git a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.cpp b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.cpp index 3e8d256a08..d2cde40a10 100644 --- a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.cpp +++ b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.cpp @@ -24,6 +24,7 @@ #include "ClComponentActivation.h" #include "src/core/CL/CLValidate.h" +#include "src/dynamic_fusion/sketch/gpu/ckw_driver/components/GpuCkwActivation.h" #include "src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateActivation.h" namespace arm_compute @@ -65,7 +66,8 @@ ClComponentActivation::ClComponentActivation(ComponentId const ArgumentPack &tensors, const Attributes &attributes) : 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) } { } @@ -77,6 +79,11 @@ const IGpuTemplateComponentWriter *ClComponentActivation::template_writer() cons { return _component_writer.get(); } + +const IGpuCkwComponentDriver *ClComponentActivation::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/ClComponentActivation.h b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h index d5013acddf..0b7f664a15 100644 --- a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h +++ b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h @@ -24,6 +24,7 @@ #ifndef SRC_DYNAMIC_FUSION_SKETCH_GPU_COMPONENTS_CL_CLCOMPONENTACTIVATION #define SRC_DYNAMIC_FUSION_SKETCH_GPU_COMPONENTS_CL_CLCOMPONENTACTIVATION +#include "arm_compute/core/ActivationLayerInfo.h" #include "src/dynamic_fusion/sketch/gpu/components/IGpuKernelComponent.h" namespace arm_compute @@ -40,6 +41,7 @@ class ArgumentPack; /** Forward declaration */ class ClTemplateActivation; +class GpuCkwActivation; class ClComponentActivation final : public IGpuKernelComponent { @@ -105,6 +107,8 @@ public: /** Get template writer for the component */ const IGpuTemplateComponentWriter *template_writer() const override; + const IGpuCkwComponentDriver *ckw_component_driver() const override; + /** Get component type */ GpuComponentType type() const override { @@ -113,6 +117,7 @@ public: private: std::unique_ptr _component_writer; + std::unique_ptr _ckw_driver; }; } // namespace dynamic_fusion } // namespace experimental -- cgit v1.2.1