This section describes the cl_khr_priority_hints extension. This extension adds priority hints for OpenCL, but does not specify the scheduling behavior or minimum guarantees. It is expected that the the user guides associated with each implementation which supports this extension will describe the scheduling behavior guarantees.
The function {clCreateCommandQueueWithProperties} (Section 5.1) is extended to support a priority value as part of the properties argument.
The priority property applies to OpenCL command queues that belong to the same OpenCL context.
The properties field accepts the {CL_QUEUE_PRIORITY_KHR} property, with a value of type {cl_queue_priority_khr_TYPE}, which can be one of:
-
{CL_QUEUE_PRIORITY_HIGH_KHR}
-
{CL_QUEUE_PRIORITY_MED_KHR}
-
{CL_QUEUE_PRIORITY_LOW_KHR}
If {CL_QUEUE_PRIORITY_KHR} is not specified then the default priority is {CL_QUEUE_PRIORITY_MED_KHR}.
To the error section for {clCreateCommandQueueWithProperties}, the following is added:
-
{CL_INVALID_QUEUE_PROPERTIES} if the {CL_QUEUE_PRIORITY_KHR} property is specified and the queue is a {CL_QUEUE_ON_DEVICE}.