diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2024-01-17 16:07:03 +0000 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2024-02-01 16:00:34 +0000 |
commit | 2b9fa593a0a172bf36a02b5cdb840c6b9b361d7c (patch) | |
tree | a4e2d5ce46443a79a0778e4960462ce3edf106ec /compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h | |
parent | 7ab7fca87cca8775f82b0e9efec6a40975910c17 (diff) | |
download | ComputeLibrary-2b9fa593a0a172bf36a02b5cdb840c6b9b361d7c.tar.gz |
Use the stable CKW API in the GPU dynamic fusion backend
- Refactor all kernels to work with the CKW stable API
- Add support for sub-tile in the op_load/op_store CKW operator
- Fix mismatch in resize
- Add comments in all kernels written with CKW to help developers
understand the structure of the code
- Add texture image support in depthwise convolution written with CKW
- Add support for different block sizes in depthwise convolution
- Remove the use of the dynamic fusion helper functions.
- Add support for floor in the op_unary() of CKW
Resolves: COMPMID-6708, COMPMID-6743, COMPMID-6530
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Signed-off-by: Jakub Sujak <jakub.sujak@arm.com>
Change-Id: I8104ce4d04a3138a1aeb0b84940e1f1c89e76069
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10914
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h')
-rw-r--r-- | compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h b/compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h index 4e1a842fe1..a6b3272f32 100644 --- a/compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h +++ b/compute_kernel_writer/src/cl/helpers/CLMemoryOpBufferHelper.h @@ -22,8 +22,8 @@ * SOFTWARE. */ -#ifndef CKW_SRC_CL_CLMEMORYOPBUFFERHELPER_H -#define CKW_SRC_CL_CLMEMORYOPBUFFERHELPER_H +#ifndef CKW_SRC_CL_HELPERS_CLMEMORYOPBUFFERHELPER_H +#define CKW_SRC_CL_HELPERS_CLMEMORYOPBUFFERHELPER_H #include "src/cl/helpers/ICLMemoryOpHelper.h" @@ -37,6 +37,8 @@ namespace ckw // Forward Declarations class CLKernelWriter; class CLTile; +template <class CLTile> +class TileView; enum class MemoryOperation; /** Helper class to write memory operations (like load/store) in OpenCL @@ -45,19 +47,23 @@ class CLMemoryOpBufferHelper : public ICLMemoryOpHelper { public: /** Constructor similar to @ref ICLMemoryOpHelper() */ - CLMemoryOpBufferHelper(CLKernelWriter *writer, ITensor *tensor, TensorSampler *sampler, MemoryOperation op) - : ICLMemoryOpHelper(writer, tensor, sampler, op) + CLMemoryOpBufferHelper(CLKernelWriter *writer, + ITensor *tensor, + TensorSampler *sampler, + MemoryOperation op, + const TileView<CLTile> &dst) + : ICLMemoryOpHelper(writer, tensor, sampler, op, dst) { } /** Copy constructor */ - CLMemoryOpBufferHelper(const CLMemoryOpBufferHelper &) = default; + CLMemoryOpBufferHelper(const CLMemoryOpBufferHelper &) = delete; /** Assignment operator overload */ - CLMemoryOpBufferHelper &operator=(const CLMemoryOpBufferHelper &) = default; + CLMemoryOpBufferHelper &operator=(const CLMemoryOpBufferHelper &) = delete; // Methods overridden - void initialize(const CLTile *dst, const CLTile *x, const CLTile *z, const CLTile *b) override; + void initialize(const CLTile *x, const CLTile *z, const CLTile *b) override; void write_row(int32_t row_id, const std::string &coord_y) override; void finalize() override; @@ -78,12 +84,12 @@ private: std::vector<LeftoverDescriptor> _leftovers_x{}; std::string _coord_orig_z{}; - static bool validate(const CLKernelWriter *writer, - const ITensor *tensor, - const TensorSampler *sampler, - const Tensor3dMapper *mapper, - MemoryOperation op, - const CLTile *dst); + static bool validate(const CLKernelWriter *writer, + const ITensor *tensor, + const TensorSampler *sampler, + const Tensor3dMapper *mapper, + MemoryOperation op, + const TileView<CLTile> &dst); void out_of_bound_initialize_x(const std::string &coord); void out_of_bound_finalize_x(); @@ -99,4 +105,4 @@ private: }; } // namespace ckw -#endif /* CKW_SRC_CL_CLMEMORYOPBUFFERHELPER_H */ +#endif // CKW_SRC_CL_HELPERS_CLMEMORYOPBUFFERHELPER_H |