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/src/cl/CLKernelWriter.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compute_kernel_writer/src/cl/CLKernelWriter.h') diff --git a/compute_kernel_writer/src/cl/CLKernelWriter.h b/compute_kernel_writer/src/cl/CLKernelWriter.h index e6f0641538..d0c4b7c9d4 100644 --- a/compute_kernel_writer/src/cl/CLKernelWriter.h +++ b/compute_kernel_writer/src/cl/CLKernelWriter.h @@ -57,6 +57,13 @@ public: std::unique_ptr emit_kernel(const std::string &name) override; + /** Declare a tile given name and tile information + * + * Similar to @ref KernelWriter::declare_tile() + */ + ITileOperand &declare_tile(const ::std::string &name, const TileInfo &tile_info) override; + + protected: /** Append the specified code to the kernel body source code. */ template @@ -76,6 +83,9 @@ protected: /** Get the current kernel body source code. */ const std::string &body_source_code() const; + /** Add a tile operand to the kernel and return it */ + ITileOperand &add_operand(const std::string &code, const TileInfo &tile_info) override; + private: /** This string contains the kernel body source code, not the full CL source code. * The full source code will only be generated when the user calls @ref KernelWriter::emit_kernel. -- cgit v1.2.1