aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/src/cl/CLKernelWriter.h
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2023-07-11 14:57:36 +0100
committerGunes Bayir <gunes.bayir@arm.com>2023-07-12 10:09:19 +0000
commitab0b75054ca3ddd62cff34518f331aa8474daa5a (patch)
treebf23ec6a1baee5b7359af1b91fb4b3a462760e2f /compute_kernel_writer/src/cl/CLKernelWriter.h
parent653b96c9a72b2b6d4d82d6ee67b51be66351c617 (diff)
downloadComputeLibrary-ab0b75054ca3ddd62cff34518f331aa8474daa5a.tar.gz
Add tile declaration capability in KernelWriter
Resolves: COMPMID-5816 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: Ibd885707a842550a058252f9d01e072129896055 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9901 Tested-by: Arm Jenkins <bsgcomp@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/src/cl/CLKernelWriter.h')
-rw-r--r--compute_kernel_writer/src/cl/CLKernelWriter.h10
1 files changed, 10 insertions, 0 deletions
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<Kernel> 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 <typename T, typename... TArgs>
@@ -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.