diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2023-08-17 11:04:02 +0100 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2023-08-30 15:45:59 +0000 |
commit | d5f9a1cf9f0340f3e6bf9ff00156fc2adb1fdca9 (patch) | |
tree | af23cff1cb3a504ee51676cd9bfc74b75934fef2 /compute_kernel_writer/src/cl/CLKernelWriter.h | |
parent | 91cb7336400acc857e20086a23692f99fe11be9c (diff) | |
download | ComputeLibrary-d5f9a1cf9f0340f3e6bf9ff00156fc2adb1fdca9.tar.gz |
Implement indirect load for buffer and CLImage
Add KernelWriter API functions for loading from an indirect buffer
Resolves: COMPMID-6390
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Change-Id: I45dbf88b25ec5caf2b458657ef20aacac9924745
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10192
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@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.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/compute_kernel_writer/src/cl/CLKernelWriter.h b/compute_kernel_writer/src/cl/CLKernelWriter.h index c494847944..1e2e5dc910 100644 --- a/compute_kernel_writer/src/cl/CLKernelWriter.h +++ b/compute_kernel_writer/src/cl/CLKernelWriter.h @@ -131,40 +131,27 @@ public: // Memory Operations // ============================================================================================= - /** Load the data from the tensor memory to the tile using the sampling information. - * - * Similar to @ref KernelWriter::op_load() - */ void op_load( const TileOperand &tile_op, const TensorOperand &tensor_op, TensorSampler &sampler, const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch) override; - /** Load the data from the tensor memory to the tile in a dilated way using the sampling information. - * - * Similar to @ref KernelWriter::op_load_dilated() - */ void op_load_dilated( const TileOperand &tile_op, const TensorOperand &tensor_op, TensorSampler &sampler, const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch, const TileOperand &dilation_x, const TileOperand &dilation_y) override; - /** Store the data to the tensor memory from the tile using the sampling information. - * - * Similar to @ref KernelWriter::op_store() - */ void op_store( const TensorOperand &tensor_op, const TileOperand &tile_op, TensorSampler &sampler, const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch) override; - /** Store the data to the tensor memory from the tile in a dilated way using the sampling information. - * - * Similar to @ref KernelWriter::op_store_dilated() - */ void op_store_dilated( const TensorOperand &tensor_op, const TileOperand &tile_op, TensorSampler &sampler, const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch, 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; + protected: /** Return @ref CLTile object from the @ref TileOperand object. * @@ -192,11 +179,10 @@ protected: // For helper functions private: - /** Helper function 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, + /** 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); + const CLTile &dilation_x, const CLTile &dilation_y, bool indirect_buffer); /** This function is the generic function to write both `if` and `else if` blocks. * |