Asynchronous Execution#
The function qpl_execute_job()
in Quick Start is the
synchronous interface. It does not return until the job has completed. If the application
wants to do other work while the job is being processed on the accelerator, it can use the
asynchronous interface. In this case, the application specifies the Hardware Path
or Auto Path
for the execution and submits the job using qpl_submit_job()
. The status of the job can then be
periodically queried by qpl_check_job()
. The application may call qpl_wait_job()
to wait until the job completes.
Note
Synchronous interface qpl_execute_job()
is essentially a
combination of the asynchronous interface qpl_submit_job()
followed by
qpl_wait_job()
.
Asynchronous Execution and Auto Path
#
When the application specifies Auto Path
for an asynchronous execution, host fallback may happen inside
qpl_submit_job()
, qpl_wait_job()
, or qpl_check_job()
.
If host fallback doesn’t happen, these APIs will return status from the asynchronous accelerator execution.
If host fallback happens inside an API, it will switch to execution on the CPU host, finish the execution, and return its status.
After the host fallback has happened, subsequent calls to qpl_wait_job()
and qpl_check_job()
will return QPL_STS_OK
to indicate that the execution has already completed.