Kernel Optimization for performance
Examples Table
| Example | Description | Key Concepts / Keywords |
|---|---|---|
| aos_vs_soa_c/ | This example demonstrates how data layout can impact the performance of certain kernels. The example we will demonstrate how using the Structure of Array data layout can impact certain data parallel problems. | Key Concepts - Kernel Optimization - Data Layout |
| array_partition_c/ | This is a simple example of matrix multiplication (Row x Col) to demonstrate how to achieve better performance by array partitioning, using HLS kernel in SDx Environment. | Key Concepts - Kernel Optimization - HLS C Kernel - Array Partition Keywords - #pragma HLS ARRAY_PARTITION - complete |
| array_partition_ocl/ | This example shows how to use array partitioning to improve performance of a kernel | Key Concepts - Kernel Optimization - Array Partitioning Keywords - xcl_array_partition - complete |
| dependence_inter_c/ | This Example demonstrates the HLS pragma 'DEPENDENCE'.Using 'DEPENDENCE' pragma, user can provide additional dependency details to the compiler by specifying if the dependency in consecutive loop iterations on buffer is true/false, which allows the compiler to perform unrolling/pipelining to get better performance. | Key Concepts - Inter Dependence Keywords - DEPENDENCE - inter - WAR |
| lmem_2rw_c/ | This is simple example of vector addition to demonstrate how to utilized both ports of Local Memory memory. | Key Concepts - Kernel Optimization - 2port BRAM Utilization - two read/write Local Memory Keywords - #pragma HLS UNROLL FACTOR=2 |
| lmem_2rw_ocl/ | This is simple example of vector addition to demonstrate how to utilized both ports of Local Memory. | Key Concepts - Kernel Optimization - 2port BRAM Utilization - two read/write Local Memory Keywords - opencl_unroll_hint(2) |
| loop_fusion_c/ | This example will demonstrate how to fuse two loops into one to improve the performance of an OpenCL C/C++ Kernel. | Key Concepts - Kernel Optimization - Loop Fusion - Loop Pipelining Keywords - #pragma HLS PIPELINE |
| loop_fusion_ocl/ | This example will demonstrate how to fuse two loops into one to improve the performance of an OpenCL kernel. | Key Concepts - Kernel Optimization - Loop Fusion - Loop Pipelining Keywords - xcl_pipeline_loop |
| loop_pipeline_c/ | This example demonstrates how loop pipelining can be used to improve the performance of a kernel. | Key Concepts - Kernel Optimization - Loop Pipelining Keywords - pragma HLS PIPELINE |
| loop_reorder_c/ | This is a simple example of matrix multiplication (Row x Col) to demonstrate how to achieve better pipeline II factor by loop reordering. | Key Concepts - Kernel Optimization - Loop reorder to improve II Keywords - #pragma HLS PIPELINE - #pragma HLS ARRAY_PARTITION |
| loop_reorder_ocl/ | This is a simple example of matrix multiplication (Row x Col) to demonstrate how to achieve better pipeline II factor by loop reordering. | Key Concepts - Kernel Optimization - Loop reorder to improve II Keywords - xcl_pipeline_loop - xcl_array_partition(complete, 2) |
| partition_cyclicblock_c/ | This example shows how to use array block and cyclic partitioning to improve performance of a kernel | Key Concepts - Kernel Optimization - Array Partitioning - Block Partition - Cyclic Partition Keywords - #pragma HLS ARRAY_PARTITION - cyclic - block - factor - dim |
| partition_cyclicblock_ocl/ | This example shows how to use array block and cyclic partitioning to improve performance of a kernel | Key Concepts - Kernel Optimization - Array Partitioning - Block Partition - Cyclic Partition Keywords - xcl_array_partition - cyclic - block |
| shift_register_c/ | This example demonstrates how to shift values in registers in each clock cycle | Key Concepts - Kernel Optimization - Shift Register - FIR Keywords - #pragma HLS ARRAY_PARTITION |
| shift_register_ocl/ | This example demonstrates how to shift values in registers in each clock cycle | Key Concepts - Kernel Optimization - Shift Register - FIR Keywords - xcl_array_partition - getprofilingInfo() |
| sum_scan_ocl/ | This is a simple example to explain the usage of pipeline and array partitioning for designing parallel prefix sum | Key Concepts - Kernel Optimization - Array Partitioning - Pipeline Keywords - xcl_array_partition - xcl_pipeline_loop |
| systolic_array_c/ | This is a simple example of matrix multiplication (Row x Col) to help developers learn systolic array based algorithm design. Note : Systolic array based algorithm design is well suited for FPGA. | |
| systolic_array_ocl/ | This is a simple example of matrix multiplication (Row x Col) to help developers learn systolic array based algorithm design. Note: Systolic array based algorithm design is well suited for FPGA. | |
| vectorization_memorycoalescing_ocl/ | This example is a simple OpenCL application which highlights the vectorization concept. It provides a basis for calculating the bandwidth utilization when the compiler looking to vectorize. | Key Concepts - Vectorization - Memory Coalescing Keywords - vec_type_hint |