Visible to Intel only — GUID: GUID-E803F90D-E085-4112-9D89-7D70CA341539
Visible to Intel only — GUID: GUID-E803F90D-E085-4112-9D89-7D70CA341539
Multithreaded Host Application
When there are parallel, independent datapaths and the host must process data between kernel executions, consider using a multithreaded host application.
The following figure illustrates how a single-threaded host application might process parallel, independent datapaths between kernel executions:
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.
Multithreaded host applications are supported when only device code interacts with pipes (sometimes referred to as "interkernel pipes"). If host code interacts with pipes (sometimes referred to as "host pipes"), the multithreaded host applications is unsupported.
A SYCL system that has FPGAs installed does not support multiprocess 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 multithreaded host application processes parallel, independent datapaths between kernel executions: