diff options
author | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-07-10 15:07:45 +0100 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2023-07-14 15:06:16 +0000 |
commit | 66f3d380cacb154748fdb2ac827da2377a2d1910 (patch) | |
tree | f7156ab390cd6e8a7d15b4403cca04542f1da1d5 /src/dynamic_fusion/sketch/gpu/components/cl | |
parent | 4184e86508c3b1a744e9687d1112ba5f65f55eeb (diff) | |
download | ComputeLibrary-66f3d380cacb154748fdb2ac827da2377a2d1910.tar.gz |
Port ClTemplateCast into Ckw
Resolves COMPMID-6257
Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com>
Change-Id: I3e56ff1f1109924da02d0abd0354a3f1fa095ee7
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9914
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Nikolaj Jensen <nikolaj.jensen@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/dynamic_fusion/sketch/gpu/components/cl')
-rw-r--r-- | src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.cpp | 11 | ||||
-rw-r--r-- | src/dynamic_fusion/sketch/gpu/components/cl/ClComponentCast.h | 6 |
2 files changed, 14 insertions, 3 deletions
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<ClTemplateCast>(id, tensors, attributes) } + _component_writer{ std::make_unique<ClTemplateCast>(id, tensors, attributes) }, + _ckw_driver{ std::make_unique<GpuCkwCast>(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<ClTemplateCast> _component_writer; + std::unique_ptr<GpuCkwCast> _ckw_driver; }; } // namespace dynamic_fusion } // namespace experimental |