diff options
author | SiCong Li <sicong.li@arm.com> | 2023-06-28 09:49:45 +0100 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2023-07-25 15:48:50 +0000 |
commit | 23882a9014eb3972bca958206866c8e0d0b829cc (patch) | |
tree | 9139b91699099160e26a64abd8cf182bd7447278 /compute_kernel_writer/prototype | |
parent | 0a59e69fd922b02d9e3b5b043ee7f891061df7be (diff) | |
download | ComputeLibrary-23882a9014eb3972bca958206866c8e0d0b829cc.tar.gz |
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 <sicong.li@arm.com>
Change-Id: I0ab225a4484eb2119643d900a4e72806558626ee
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9917
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Reviewed-by: Anitha Raj <Anitha.Raj@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/prototype')
-rw-r--r-- | compute_kernel_writer/prototype/include/ckw/Kernel.h | 11 | ||||
-rw-r--r-- | compute_kernel_writer/prototype/src/Kernel.cpp | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/compute_kernel_writer/prototype/include/ckw/Kernel.h b/compute_kernel_writer/prototype/include/ckw/Kernel.h index 3deb2ace0d..ba31a29ba7 100644 --- a/compute_kernel_writer/prototype/include/ckw/Kernel.h +++ b/compute_kernel_writer/prototype/include/ckw/Kernel.h @@ -50,6 +50,11 @@ class Kernel public: /** Constructor * + * @param[in] language The programming language to write the kernel. + */ + Kernel(GpuTargetLanguage language); + /** Constructor + * * @param[in] name The name of the kernel function. * @param[in] language The programming language to write the kernel. */ @@ -61,6 +66,12 @@ public: /** Get the name of the kernel function. */ const std::string &name() const; + /** Set the name of the kernel function. + * + * @param[in] name The name of the kernel function. + */ + void name(const std::string &name); + /** Get the list of kernel arguments. */ ::std::vector<KernelArgument> arguments() const; diff --git a/compute_kernel_writer/prototype/src/Kernel.cpp b/compute_kernel_writer/prototype/src/Kernel.cpp index 884b69afc6..095ac879f1 100644 --- a/compute_kernel_writer/prototype/src/Kernel.cpp +++ b/compute_kernel_writer/prototype/src/Kernel.cpp @@ -30,11 +30,17 @@ namespace ckw { +Kernel::Kernel(GpuTargetLanguage language) + : Kernel{"unnamed", language} +{ +} + Kernel::Kernel(const char *name, GpuTargetLanguage language) : _name(name), _kernel(std::make_unique<prototype::GpuKernelWriterDataHolder>(language)), _operands{}, _tensor_id_operands{} { } + Kernel::~Kernel() { } @@ -44,6 +50,10 @@ const std::string &Kernel::name() const return _name; } +void Kernel::name(const std::string& name) +{ + _name = name; +} std::vector<KernelArgument> Kernel::arguments() const { std::vector<KernelArgument> arguments; |