aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/CMakeLists.txt
AgeCommit message (Collapse)Author
2023-09-22Add row vector and scalar access support to tile operandViet-Hoa Do
* 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>
2023-08-29Add CKW flow control writing methodsViet-Hoa Do
* Structures: if/else/else if, for, return. * Add corresponding tests. Partially resolves: COMPMID-6387 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I2912ccaf46f836907f21bb53fa82bcc1f48dd224 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10199 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-29Add declare_constant_tile API function in CKWGunes Bayir
Resolves: COMPMID-6535 Change-Id: I07d8aca96a0fcbd624f828b24513ee0500a14a74 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10200 Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-22Add CKW writing methods for CL unary opsViet-Hoa Do
* Add writing methods for: - Assignment. - Cast. - Unary expression. * Add corresponding tests. Partially resolves: COMPMID-6388. Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ia654173e2e1ee9cddb7819980251e0591934439f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10155 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-17Add memory operation helper class for OpenCL image2d typeGunes Bayir
CLMemoryOpImage2dHelper will be used by load/store facility in the CLKernelwriter. Partially Resolves: COMPMID-6389 Change-Id: I0b5f14546391e4e1fea3659dd04f601cdc27bfc4 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10098 Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-16Add memory operation helper class for OpenCL buffer typeGunes Bayir
CLMemoryOpBufferHelper will be used by load/store facility in the CLKernelwriter. Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I3e49b1cdd90f0bf6a43dcd6d88863d4a4496c04b Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10119 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-07Add kernel argument emittingViet-Hoa Do
Resolves: COMPMID-6391 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I0d54d99ffad275400c6da7fe16deb544553060eb Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10004 Reviewed-by: Anitha Raj <Anitha.Raj@arm.com> 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>
2023-08-07Add Tensor3dMapper to CKWGunes Bayir
In CKW, tensors are assumed to be 3d, except the batch dimension. Tensor3dMapper class defines how an Nd tensor is mapped to 3d. It also provides utility functions to access certain dimensions and the associated strides. Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I17c176220201ff92954ab5808fa1c1f29966d4e9 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9993 Benchmark: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-08-07Port DirectConv2d to CKW backendJakub Sujak
Ports the direct convolution 2D kernel from the experimental Dynamic Fusion interface to use the new Compute Kernel Writer backend for OpenCL code generation. Support is for FP16/FP32 only. Resolves: COMPMID-6259 Change-Id: Ia8d7b9cb789737b22b1d877cd798a73eda0ce4ab Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10059 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-07-27Add TensorOperand and declare tensor argumentViet-Hoa Do
Partially resolves: COMPMID-6391 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I849d486401f99a93919015f2e173559dca5bffa2 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9972 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-07-27Add TensorSampler to CKWGunes Bayir
Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: Ib9af89d218c8b69ac683ef202401786a807c51b3 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9969 Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Reviewed-by: Anitha Raj <Anitha.Raj@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>
2023-07-25Use CLTile for both variable and constant tilesViet-Hoa Do
* It's easier to reuse CLTile for other things for example tensor component if it can represent both variable and constant tiles. Partially resolves: COMPMID-6391 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ief06f670332cb339bd31b94a31b4bec186e1f1b8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9966 Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-07-20Integrate CLTensorArgumentGian Marco Iodice
- Add CLTensorArgument to query the components and storages as OpenCL variables (or by values when possible) - Add caching mechanism in CLTensorArgument to keep track of the components and storages used - Add unit tests Resolves COMPMID-5787 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ib39e1f77b097e5b907a296fe6b0d41bb4bcd4ffc Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9908 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
2023-07-12Rename ITileOperand and introduce vector/scalar interfaces in CKWGunes Bayir
Partially Resolves: COMPMID-5788 This patch - renames ITileOperand to TileOperand, which seems to be a more intuitive name for the prospective users of Compute Kernel Writer - provides IScalarAccess and IVectorAccess interfaces to be used by Tile classes. It replaces the current IScalarTile and IVectorTile, and forms a more intuitive inheritance hierarchy where each subclass "is a" member of the parent class semantically. Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I2b5253b0595e63f8ff3047c608d593b3b364634d Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9910 Reviewed-by: Jakub Sujak <jakub.sujak@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> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-07-11Add kernel and kernel writer skeletonsViet-Hoa Do
* Add the skeleton for kernel, kernel writer and their respective OpenCL implementation. * Add method to write code comment and its test. Resolves: COMPMID-6343 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ib986228154f7a00da7a5fd3b7105941325fe13b1 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9889 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-07-06Pack CKW objects into Compute Library archiveJakub Sujak
Previously, building the `arm_compute-static` archive would fail the linking stage due to the Compute Kernel Writer (CKW) symbols not being correctly included. We fix this issue by collecting the built CKW objects and packing them into the Compute Library archive during SCons build time. Compiling the shared library remains unchanged, and still statically links against CKW. Resolves: COMPMID-6342 Change-Id: I841ed7379652fbede6afe9e90a98202656683086 Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9873 Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-07-06Implement ITileOperand and set the relationship to CLTileGunes Bayir
Partially Resolves: COMPMID-5788 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I268cf02e4b1802b1718b39f251e42042e79e7443 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9869 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
2023-07-06Move CKW prototype to separate directoryViet-Hoa Do
Partially resolves: COMPMID-6283 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I7596e3dc357d6f0b9cbe66534523943a73c26d81 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9864 Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-06-29Improvements to building CKWJakub Sujak
* Always link Compute Kernel Writer statically to Compute Library * Move CMake logic to be set on libckw target * Build CKW in parallel from SCons Resolves: COMPMID-6297 Change-Id: I247a1f6ddf84a58032358a196574866b857d9bdc Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9834 Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-06-27Compute kernel writer API and prototypeViet-Hoa Do
* Add the public API for compute kernel writer. * Use the prototype as the implementation of the public API. Resolves: COMPMID-5790 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I9d80e15325e1d953feb87c1f2eb61a587bb9ab5e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9814 Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-06-26Add helpers to set CKW tensor components as OpenCL kernel argumentsJakub Sujak
* Define ckw::TensorStorage. The tensor storage represents the type of tensor memory object. * Add helper functions for setting the CKW TensorComponent and TensorStorage as OpenCL kernel arguments. * Refactor CL Image2D method for simpler image object creation. Resolves: COMPMID-5784 Change-Id: I2d37d06783c1dc55f3b5692b44eb49b151f2401c Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9807 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-06-20Implement CLConstantTileGian Marco Iodice
- Create tile object to store constant variables - Add unit tests for the CLConstantTile - Extend unit test for CLTile Resolves COMPMID-5786 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Change-Id: I351d8b88327e071791b781a04a6ab4990c89c04d Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9794 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
2023-06-14Add a Getting Started guide to CKW READMEJakub Sujak
Resolves: COMPMID-6299 Change-Id: I3b9c464e8cdc6c081472ec0aa6b738c7ccb18b49 Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9759 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-06-12Enable building Compute Kernel Writer from SconsJakub Sujak
Add a 'CKW' option to Compute Library's Sconscript that invokes the Compute Kernel Writer subproject's CMake build and links CKW to the main library. Resolves: COMPMID-6297 Change-Id: I8d45c8a950da5c13a15d39064636bb25ba7a2913 Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9748 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Ramy Elgammal <ramy.elgammal@arm.com> Dynamic-Fusion: Ramy Elgammal <ramy.elgammal@arm.com>
2023-06-01Add CMakeLists to Compute Kernel WriterJakub Sujak
Resolves: COMPMID-6276 Change-Id: Id6d6d8c1a92cf2b11c1240e044d31f386fbda61e Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9700 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>