aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer
AgeCommit message (Collapse)Author
2024-02-09Remove CKW prototype and Template WriterGunes Bayir
Gpu code in dynamic fusion is now written by stable CKW. We do not need CKW protoype and the older writer implementation, i.e. TemplateWriter. It also removes the need for the flag -DACL_INTERNAL_TEST_CKW_IN_DF to compile and test dynamic fusion operator. Resolves: COMPMID-6715 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I9f9453311e79d9be612bd4754240d832f98503e8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11116 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
2024-02-06Fix compilation issue in CKW due to unused variableGunes Bayir
Partially Resolves: COMPMID-6708, COMPMID-6743, COMPMID-6530 Change-Id: Ia229f96e02dafa35ea96aa7d50c985c74a475029 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11082 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Anitha Raj <Anitha.Raj@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
2024-02-01Use the stable CKW API in the GPU dynamic fusion backendGunes Bayir
- 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>
2023-10-31Extend CKW MatMul with nt_tAdnan AlSinan
- Add the kernel variant: (nt_t) to GpuCKWMatMul. - Extend CKW MatMul validation test with nt_t. - Fixes a bug in CKW where z-dim = 1. Resolves: COMPMID-6435 Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com> Change-Id: I4c5e8791e55f21ffff3c11eca7802c51a4259977 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10525 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-10-04Port DepthwiseConv2d operator to Ckwramy.elgammal@arm.com
- Only support 1x1 blocks, i.e. n0=1, m0=1. - Dilation not supported yet. Resolves: COMPMID-6258 Signed-off-by: ramy.elgammal@arm.com <ramy.elgammal@arm.com> Change-Id: I1dcfd7640fb40e112736dedc81847f7b1b50dba2 Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10411 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-09-28Revise clang-format configurationJakub Sujak
Clang-format options now match those in clang-format version 14. Remove Astyle checks as the same code style checks are provided by clang-format. Resolves: COMPMID-6576 Change-Id: Iefa9bb719826242a3276e9ca058d0c84624f7302 Signed-off-by: Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10399 Benchmark: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-09-28Apply clang-format on repositoryFelix Thomasmathibalan
Code is formatted as per a revised clang format configuration file(not part of this delivery). Version 14.0.6 is used. Exclusion List: - files with .cl extension - files that are not strictly C/C++ (e.g. Android.bp, Sconscript ...) And the following directories - compute_kernel_writer/validation/ - tests/ - include/ - src/core/NEON/kernels/convolution/ - src/core/NEON/kernels/arm_gemm/ - src/core/NEON/kernels/arm_conv/ - data/ There will be a follow up for formatting of .cl files and the files under tests/ and compute_kernel_writer/validation/. Signed-off-by: Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
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-31Port ClTemplatePool2d to ckwAdnan AlSinan
- Fixes a bug when using FP16 constant in some cases. - Adds op_write_raw_code to handle some special cases. - Ports MxN pooling 2d layer into ckw. - Adds unary function 'negate' to ckw. - Updates pool2d validation tests to include store op. Resovles COMPMID-6263 Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com> Change-Id: If8c683761fead79bd519aef28cc65de78d3ec629 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10172 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-30Implement indirect load for buffer and CLImageGunes Bayir
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>
2023-08-30Port Resize operator to CKWGunes Bayir
Use Compute Kernel Writer (CKW) to generate code for Resize operator in the Dynamic Fusion interface. Supports Nearest Neighbor and Bilinear interpolation methods. Resolves: COMPMID-6265 Change-Id: Ib0a5158bd4208123c84f6a1dc54f29d82fd55dcd Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10174 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-30Add get_global_id and printf for CKWViet-Hoa Do
Resolves: COMPMID-6387 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I5bedb2fdb658a6eb5f1d5053b3840ca81cf75d03 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10214 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-08-30Minor fixes in CKWViet-Hoa Do
* Address some outstanding issues from previous commits. Resolves: COMPMID-6387 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Iab504c20e9b30601b8745c092259a74ccfedf804 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10215 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
2023-08-29Fix load/store tests in CKWGunes Bayir
The tests were disabled because some tests requires constants and constant tile declaration was not present. Partially Resolves: COMPMID-5791, COMPMID-6389 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: Icf8a901e9b552207bff1366955b88ec46d47bf04 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10211 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: 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-24Add CKW binary and ternary statementsViet-Hoa Do
Resolves: COMPMID-6388 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ia0cd1486f368af54053066f489cac83b9de01789 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10182 Reviewed-by: Gunes Bayir <gunes.bayir@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-18Implement load/store API functionsGunes Bayir
Add KernelWriter API functions for loading and storing tiles with and without dilations. Resolves: COMPMID-5791, COMPMID-6389 Change-Id: I9b1f5b2f081fa54e7bda488aac69ed8d43d1d35c Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10152 Tested-by: Arm Jenkins <bsgcomp@arm.com> 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>
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-15Refactor the Tensor3dMapper objectGian Marco Iodice
- Return TileVariable instead of std::string - Accept TensorSamplerFormat instead of TensorSamples in the list of constructor input arguments Resolves COMPMID-6496 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Change-Id: Idb555cbed45d741b049dfbbc1d4bbddf139deae4 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10131 Benchmark: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
2023-08-10Decrease the abstraction level of memory op helpers to OpenCL levelGunes Bayir
Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I2b8d05a2ff9600ef82866d4fb7ea8c0f68ad78b7 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10093 Reviewed-by: Anitha Raj <Anitha.Raj@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: 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 Memory Operation enum and helper base classGunes Bayir
This type and class will be used by OpenCL specific helper classes for buffer and texture storage types. Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: Ie077e6d8a8d23d1edfc7bb4c19a6d1a98a44e36f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10000 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Tested-by: 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-08-07Document the Conv2D heuristicGian Marco Iodice
- Add a new section in the documentation to describe how the conv2D heuristic works on Arm® Cortex®-based CPUs and Arm® Mali™-based GPUs - Add CKW_UNUSED in compute_kernel_writer/src/cl/CLTile.cpp to avoid the compilation error due to an unused variable - Remove FFT from the list of algorithms to be selected by the CPU Conv2d heuristic. Resolves COMPMID-6163 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Change-Id: I51384d7749451b2562642683e8b2429a355166bb Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10065 Benchmark: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
2023-08-02Add helpers methods to CLHelpers in CKWGunes Bayir
This patch adds some helper methods to perform - scalar and vector data type to string conversion - decompose a vector length to a superposition of OpenCL vector lengths Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I14495773a6bb57bd3c3565a0d6e44b891159a948 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9995 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-08-02Add op_write_raw_code to KernelWriter classesGunes Bayir
op_write_raw_code helps writing plain text to kernel body. It's used to address the cases where the user needs to explicitly add a code where it's not (yet) supported by the kernel writer utility calls. Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I04288457ac1871aea8bf10276bf9f078e17fc4b4 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9996 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
2023-07-28Port ElementwiseBinary to CKW part 2SiCong Li
* Add fp16 support * Implement broadcasting to elementwise binary * Implement kernel name and kernel config id * Always use explicit cast in ckw unary, binary and ternary elementwise functions. This is to address the accidental use of double literals, with other benefits. * Refactor TypeConverter for smaller includes Resolves COMPMID-6260 Change-Id: I26b726746f8c0dd7b5942ad379d56f4d7642d15f Signed-off-by: SiCong Li <sicong.li@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9999 Tested-by: Arm Jenkins <bsgcomp@arm.com> 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>
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-26Design wrapper around CKW for easier writingNikolaj Jensen
Signed-off-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Change-Id: I114cdedcaf05c6abde046741837eeb73b813aa9d Signed-off-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/532180 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Signed-off-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9921 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-07-25Add GpuKernelArgumentBinding for runtime argument settingSiCong Li
* Add flexible runtime argument setting that accept argument bindings exported from ckw. * Introduce internal build flag ACL_INTERNAL_TEST_CKW_IN_DF. If set to true, ckw will be tested in dynamic fusion validation tests. Otherwise it will not be tested and the dynamic fusion will keep using ClTemplateWriter instead. * Fix CKW sampler for elementwise binary to deal with tile sizes > 1 in both dimensions Resolves: COMPMID-6282 Partially resolves: COMPMID-6260 Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: I0ab225a4484eb2119643d900a4e72806558626ee Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9917 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-by: Anitha Raj <Anitha.Raj@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>
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-21Change TileOperand to a view of a tile objectViet-Hoa Do
* TileOperand instead of being the tile object now is only a view of a tile object. - declare_tile now returns a TileOperand object, not a reference to a TileOperand object. - This is to prepare for the posibility that the users need to perform operations on part of a tile (e.g. a scalar value, a vector, a sub-tile). Partially resolves: COMPMID-6391 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I35c08b22a384a756d99dcd04cbe66fc57bd548d2 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9958 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: 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-14Port ClTemplateCast into CkwAdnan AlSinan
Resolves COMPMID-6257 Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com> Change-Id: I3e56ff1f1109924da02d0abd0354a3f1fa095ee7 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9914 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
2023-07-12Add compute kernel writer arguments exportViet-Hoa Do
* The information is extracted from the prototype argument registry. Partially resolves: COMPMID-6283 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ia6d69b7c2a2e411597e76a7e03b7c92199a16990 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9848 Reviewed-by: SiCong Li <sicong.li@arm.com> 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-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-12Add tile declaration capability in KernelWriterGunes Bayir
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>
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-10Port operations to CKW prototypeNikolaj Jensen
Resolves: COMPMID-6334 Signed-off-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Change-Id: I500d30f09daec4087eb3e7aecd1de77dc8fd53b4 Signed-off-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9828 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-07-07Fix code formatting in CKWNikolaj Jensen
Signed-off-by: Nikolaj Jensen <nikolaj.jensen@arm.com> Change-Id: I8064b345c1efd243f8bded12ed5d561afe7c339a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9854 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: 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-29Fix CKW test failureViet-Hoa Do
* TileInfo constructor no longer takes width and height. It now takes height then width. Partially resolves: COMPMID-6283 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I6284de98ecaf53c1013a90bf0b71f60bb36b7c48 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9844 Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: 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>