diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-06-27 14:09:46 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-07-12 15:46:50 +0000 |
commit | c8e1617807ef1985a39d8f8f5f69c113b758494d (patch) | |
tree | 675113cc27d4e95cf61aa719fc29cc98a1ce4a50 /compute_kernel_writer/prototype/include/ckw/Kernel.h | |
parent | 3c776066a0195f2e99d3503f8b058e468d53b884 (diff) | |
download | ComputeLibrary-c8e1617807ef1985a39d8f8f5f69c113b758494d.tar.gz |
Add compute kernel writer arguments export
* The information is extracted from the prototype argument
registry.
Partially resolves: COMPMID-6283
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: Ia6d69b7c2a2e411597e76a7e03b7c92199a16990
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9848
Reviewed-by: SiCong Li <sicong.li@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/prototype/include/ckw/Kernel.h')
-rw-r--r-- | compute_kernel_writer/prototype/include/ckw/Kernel.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/compute_kernel_writer/prototype/include/ckw/Kernel.h b/compute_kernel_writer/prototype/include/ckw/Kernel.h index 527206feec..3deb2ace0d 100644 --- a/compute_kernel_writer/prototype/include/ckw/Kernel.h +++ b/compute_kernel_writer/prototype/include/ckw/Kernel.h @@ -25,16 +25,20 @@ #ifndef CKW_PROTOTYPE_INCLUDE_CKW_KERNEL_H #define CKW_PROTOTYPE_INCLUDE_CKW_KERNEL_H +#include "ckw/KernelArgument.h" #include "ckw/OperandBase.h" #include "ckw/types/GpuTargetLanguage.h" #include <map> #include <memory> #include <string> +#include <vector> namespace ckw { +class TileOperand; + namespace prototype { class GpuKernelWriterDataHolder; @@ -57,11 +61,20 @@ public: /** Get the name of the kernel function. */ const std::string &name() const; - /** (Internal use only) Get the map from operand name to the operand declared in this kernel. */ - const ::std::map<::std::string, ::std::unique_ptr<OperandBase>> &operands() const; + /** Get the list of kernel arguments. */ + ::std::vector<KernelArgument> arguments() const; + + /** (Internal use only) Register the tile operand. + * + * @param operand The tile operand to be registered. + */ + TileOperand ®ister_operand(::std::unique_ptr<TileOperand> operand); - /** (Internal use only) Get the map from operand name to the operand declared in this kernel. */ - ::std::map<::std::string, ::std::unique_ptr<OperandBase>> &operands(); + /** (Internal use only) Register the tensor operand. + * + * @param operand The tensor operand to be registered. + */ + TensorOperand ®ister_operand(::std::unique_ptr<TensorOperand> operand); /** (Internal use only) Get the implementation data. */ prototype::GpuKernelWriterDataHolder *impl(); @@ -70,6 +83,7 @@ private: ::std::string _name; ::std::unique_ptr<prototype::GpuKernelWriterDataHolder> _kernel; ::std::map<::std::string, ::std::unique_ptr<OperandBase>> _operands; + ::std::map<int32_t, TensorOperand *> _tensor_id_operands; }; } // namespace ckw |