Skip to content

Latest commit

 

History

History
 
 

Host Examples

OpenCL host code for optimized interfacing with Xilinx Devices

Examples Table

Example Description Key Concepts / Keywords
[concurrent_kernel_execution_ocl/][] This example will demonstrate how to use multiple and out of order command queues to simultaneously execute multiple kernels on an FPGA. Key Concepts
- Concurrent execution
- Out of Order Command Queues
- Multiple Command Queues
Keywords
- CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
- clSetEventCallback()
[copy_buffer_ocl/][] This Copy Buffer example demonstrate how one buffer can be copied from another buffer. Key Concepts
- Copy Buffer
Keywords
- cl::CommandQueue::enqueueCopyBuffer()
[data_transfer_ocl/][] This example illustrates several ways to use the OpenCL API to transfer data to and from the FPGA Key Concepts
- OpenCL API
- Data Transfer
- Write Buffers
- Read Buffers
- Map Buffers
- Async Memcpy
Keywords
- clEnqueueWriteBuffer()
- clEnqueueReadBuffer()
- clEnqueueMapBuffer()
- clEnqueueUnmapMemObject()
[device_query_ocl/][] This example prints the OpenCL properties of the platform and its devices. It also displays the limits and capabilities of the hardware. Key Concepts
- OpenCL API
- Querying device properties
Keywords
- clGetPlatformIDs()
- clGetPlatformInfo()
- clGetDeviceIDs()
- clGetDeviceInfo()
[errors_ocl/][] This example discuss the different reasons for errors in OpenCL and how to handle them at runtime. Key Concepts
- OpenCL API
- Error handling
Keywords
- CL_SUCCESS
- CL_DEVICE_NOT_FOUND
- CL_DEVICE_NOT_AVAILABLE
[helloworld_ocl/][] This example is a simple OpenCL application. It will highlight the basic flow of an OpenCL application. Key Concepts
- OpenCL API
[host_global_bandwidth/][] Host to global memory bandwidth test
[kernel_swap_ocl/][] This example shows how host can swap the kernels and share same buffer between two kernels exist in separate binary containers. For Non-XPR(Extended Partial Reconfiguration) Specific Devices, device memory can persist buffer data so both kernels can share data directly. Whereas in XPR devices, device memory does not persist the buffer data so host has to migrate data from device to host memory before swapping the next kernel. After kernel swap, host has to migrate the buffer back to device. Key Concepts
- Handling Buffer sharing across multiple binaries for XPR-NON_XPR Platform
- Multiple Kernel Binaries
Keywords
- clEnqueueMigrateMemObjects()
- CL_MIGRATE_MEM_OBJECT_HOST
[multiple_devices_ocl/][] This example show how to take advantage of multiple FPGAs on a system. It will show how to initialized an OpenCL context, allocate memory on the two devices and execute a kernel on each FPGA. Key Concepts
- OpenCL API
- Multi-FPGA Execution
- Event Handling
Keywords
- cl_device_id
- clGetDeviceIDs()
[overlap_ocl/][] This examples demonstrates techniques that allow user to overlap Host(CPU) and FPGA computation in an application. It will cover asynchronous operations and event object. Key Concepts
- OpenCL API
- Synchronize Host and FPGA
- Asynchronous Processing
- Events
- Asynchronous memcpy
Keywords
- cl_event
- clCreateCommandQueue
- CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
- clEnqueueMigrateMemObjects

[stream_access_ocl/][]|This is a simple example that demonstrates on how to process an input stream of data for computation in an application. It shows how to perform asynchronous operations and event handling.|Key Concepts
- OpenCL API
- Synchronize Host and FPGA
- Asynchronous Processing
- Events
- Asynchronous Data Transfer
Keywords
- cl_event
- CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE [.]:. [concurrent_kernel_execution_ocl/]:concurrent_kernel_execution_ocl/ [copy_buffer_ocl/]:copy_buffer_ocl/ [data_transfer_ocl/]:data_transfer_ocl/ [device_query_ocl/]:device_query_ocl/ [errors_ocl/]:errors_ocl/ [helloworld_ocl/]:helloworld_ocl/ [host_global_bandwidth/]:host_global_bandwidth/ [kernel_swap_ocl/]:kernel_swap_ocl/ [multiple_devices_ocl/]:multiple_devices_ocl/ [overlap_ocl/]:overlap_ocl/ [stream_access_ocl/]:stream_access_ocl/