Developer Guide

FPGA Optimization Guide for Intel® oneAPI Toolkits

ID 767853
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Multi-Threaded Host Application

When there are parallel, independent datapaths and the host must process data between kernel executions, consider using a multi-threaded host application.

The following figure illustrates how a single-threaded host application might process parallel, independent datapaths between kernel executions:

Kernel Execution by a Single-Threaded Host Application

The SYCL* runtime is thread safe and supports multithreaded applications. Thus, you can perform tasks on the host in parallel threads while still allowing those threads to access the SYCL APIs in a thread-safe way.

NOTE:

A SYCL system that has FPGAs installed does not support multi-process execution. Creating a context opens the device associated with the context and locks it for that process. No other process may use that device. Some queries about the device through device.get_info<>() also opens up the device and locks it to that process since the runtime needs to query the actual device to obtain that information. The following are examples of queries that lock the device:

  • is_endian_little
  • global_mem_size
  • local_mem_size
  • max_constant_buffer_size
  • max_mem_alloc_size
  • vendor
  • name
  • is_available

The following figure illustrates how a multi-threaded host application processes parallel, independent datapaths between kernel executions:

Kernel Execution by a Multi-Threaded Host Application in a Thread-Safe Runtime Environment