From 23882a9014eb3972bca958206866c8e0d0b829cc Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Wed, 28 Jun 2023 09:49:45 +0100 Subject: Add GpuKernelArgumentBinding for runtime argument setting * Add flexible runtime argument setting that accept argument bindings exported from ckw. * Introduce internal build flag ACL_INTERNAL_TEST_CKW_IN_DF. If set to true, ckw will be tested in dynamic fusion validation tests. Otherwise it will not be tested and the dynamic fusion will keep using ClTemplateWriter instead. * Fix CKW sampler for elementwise binary to deal with tile sizes > 1 in both dimensions Resolves: COMPMID-6282 Partially resolves: COMPMID-6260 Signed-off-by: SiCong Li Change-Id: I0ab225a4484eb2119643d900a4e72806558626ee Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9917 Tested-by: Arm Jenkins Reviewed-by: Jakub Sujak Reviewed-by: Anitha Raj Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- .../sketch/gpu/components/cl/ClComponentActivation.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h') diff --git a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h index bb6f7c6e30..ebe8719420 100644 --- a/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h +++ b/src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h @@ -42,8 +42,11 @@ template class ArgumentPack; /** Forward declaration */ +#ifndef ACL_INTERNAL_TEST_CKW_IN_DF class ClTemplateActivation; +#else //ACL_INTERNAL_TEST_CKW_IN_DF class GpuCkwActivation; +#endif //ACL_INTERNAL_TEST_CKW_IN_DF class ClComponentActivation final : public IGpuKernelComponent { @@ -106,10 +109,12 @@ public: /** Allow instances of this class to be moved */ ClComponentActivation &operator=(ClComponentActivation &&component) = default; - /** Get template writer for the component */ + /** Get writer for the component */ +#ifndef ACL_INTERNAL_TEST_CKW_IN_DF const IGpuTemplateComponentWriter *template_writer() const override; - - const IGpuCkwComponentDriver *ckw_component_driver() const override; +#else //ACL_INTERNAL_TEST_CKW_IN_DF + const IGpuCkwComponentDriver *ckw_component_driver() const override; +#endif //ACL_INTERNAL_TEST_CKW_IN_DF /** Get component type */ GpuComponentType type() const override @@ -118,8 +123,11 @@ public: } private: +#ifndef ACL_INTERNAL_TEST_CKW_IN_DF std::unique_ptr _component_writer; - std::unique_ptr _ckw_driver; +#else //ACL_INTERNAL_TEST_CKW_IN_DF + std::unique_ptr _component_writer; +#endif //ACL_INTERNAL_TEST_CKW_IN_DF }; } // namespace dynamic_fusion } // namespace experimental -- cgit v1.2.1