aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/src/cl/CLKernelWriter.h
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2023-09-19 16:41:34 +0100
committerViet-Hoa Do <viet-hoa.do@arm.com>2023-09-22 12:07:09 +0000
commitcd1f03e765ad0f3ca3b68b1a7c1d0a1539cab439 (patch)
tree9cb78579e01e14501c316f5297c804ba13c8ad37 /compute_kernel_writer/src/cl/CLKernelWriter.h
parent1f841a52f9a7f52948d676bc3807461bbed6f70a (diff)
downloadComputeLibrary-cd1f03e765ad0f3ca3b68b1a7c1d0a1539cab439.tar.gz
Add row vector and scalar access support to tile operand
* Add the concept of tile view which refers to a specific rectangular area of the tile object. - The active area is added to TileOperand so that the user can access part of the tile. - Currently only row vector and scalar access are exposed to the user. - All writing operations except load/store op support sub-tile. * Add tests for sub-tile access. Resolves: COMPMID-6557 Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ica3f9eaf17f06e080c495d36c572f623b62c2910 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10354 Reviewed-by: Gunes Bayir <gunes.bayir@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/src/cl/CLKernelWriter.h')
-rw-r--r--compute_kernel_writer/src/cl/CLKernelWriter.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/compute_kernel_writer/src/cl/CLKernelWriter.h b/compute_kernel_writer/src/cl/CLKernelWriter.h
index 1e2e5dc910..d7cf24d5e6 100644
--- a/compute_kernel_writer/src/cl/CLKernelWriter.h
+++ b/compute_kernel_writer/src/cl/CLKernelWriter.h
@@ -26,6 +26,7 @@
#define CKW_SRC_CL_CLKERNELWRITER_H
#include "ckw/KernelWriter.h"
+#include "src/TileView.h"
#include <memory>
#include <set>
@@ -150,14 +151,14 @@ public:
const TileOperand &dilation_x, const TileOperand &dilation_y) override;
void op_load_indirect(const TileOperand &tile_op, const TensorOperand &tensor_op, TensorSampler &sampler,
- const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch) override;
+ const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch) override;
protected:
- /** Return @ref CLTile object from the @ref TileOperand object.
+ /** Return a tile view containing a reference to @ref CLTile object and the active area.
*
* This function performs appropriate check before doing type casting.
*/
- const CLTile &to_cl_tile(const TileOperand &operand) const;
+ TileView<CLTile> to_cl_tile_view(const TileOperand &operand) const;
/** Append the specified code to the kernel body source code. */
template <typename T, typename... TArgs>
@@ -181,8 +182,8 @@ protected:
private:
/** Helper method to consolidate all load/store logic in this class */
void op_load_store(MemoryOperation op, const TileOperand &tile_op, const TensorOperand &tensor_op, TensorSampler &sampler,
- const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch,
- const CLTile &dilation_x, const CLTile &dilation_y, bool indirect_buffer);
+ const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch,
+ const TileView<CLTile> &dilation_x, const TileView<CLTile> &dilation_y, bool indirect_buffer);
/** This function is the generic function to write both `if` and `else if` blocks.
*