From ab0b75054ca3ddd62cff34518f331aa8474daa5a Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Tue, 11 Jul 2023 14:57:36 +0100 Subject: Add tile declaration capability in KernelWriter Resolves: COMPMID-5816 Signed-off-by: Gunes Bayir Change-Id: Ibd885707a842550a058252f9d01e072129896055 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9901 Tested-by: Arm Jenkins Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- compute_kernel_writer/include/ckw/Kernel.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'compute_kernel_writer/include/ckw/Kernel.h') diff --git a/compute_kernel_writer/include/ckw/Kernel.h b/compute_kernel_writer/include/ckw/Kernel.h index 0cab713c48..54e7ca33fd 100644 --- a/compute_kernel_writer/include/ckw/Kernel.h +++ b/compute_kernel_writer/include/ckw/Kernel.h @@ -25,12 +25,17 @@ #ifndef CKW_INCLUDE_CKW_KERNEL_H #define CKW_INCLUDE_CKW_KERNEL_H -#include "ckw/types/TargetLanguage.h" #include namespace ckw { +// Forward Declerations +class TileInfo; +class ITileOperand; + +enum class TargetLanguage; + /** The kernel that has been emitted by the kernel writer. * * It contains all the necessary information to compile and execute the kernel. @@ -38,6 +43,8 @@ namespace ckw class Kernel { public: + virtual ~Kernel(); + /** Initialize a new instance of @ref Kernel class with all emitted kernel information. * * @param[in] language The target language of the kernel. @@ -51,6 +58,9 @@ public: /** Get the source code. */ const std::string &source_code() const; + /** Add a tile operand */ + virtual ITileOperand &add_operand(const std::string &name, const TileInfo &tile_info) = 0; + private: TargetLanguage _language; std::string _source_code; -- cgit v1.2.1