aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/AclOpenClExt.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-03-18 10:59:40 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-04-28 17:05:40 +0000
commitc3c352e60050f3deacad767e429a88dc24b31af0 (patch)
treead30a0ba717a742caf5e4dcb9d89389cfdc134b0 /arm_compute/AclOpenClExt.h
parente2535154fa34ac0290ec3daaa44545be0b2b4606 (diff)
downloadComputeLibrary-c3c352e60050f3deacad767e429a88dc24b31af0.tar.gz
Add Queue support
Queues are responsible for scheduling operators and performing other runtime related activities like for example tuning. Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I0366d9048470d277b8cbf59fa42f95c0ae57c5c9 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5487 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/AclOpenClExt.h')
-rw-r--r--arm_compute/AclOpenClExt.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/arm_compute/AclOpenClExt.h b/arm_compute/AclOpenClExt.h
index 15b233ca12..b9080dabf2 100644
--- a/arm_compute/AclOpenClExt.h
+++ b/arm_compute/AclOpenClExt.h
@@ -43,7 +43,6 @@ extern "C" {
/** Extract the underlying OpenCL context used by a given Compute Library context object
*
* @note @ref AclContext should be of an OpenCL backend target
- * @note @ref AclContext refcount should be 0, meaning not used by other objects
*
* @param[in] ctx A valid non-zero context
* @param[out] opencl_context Underlying OpenCL context used
@@ -52,7 +51,18 @@ extern "C" {
*/
AclStatus AclGetClContext(AclContext ctx, cl_context *opencl_context);
-/** Set the underlying OpenCL context used by a given Compute Library context object
+/** Extract the underlying OpenCL device id used by a given Compute Library context object
+ *
+ * @note @ref AclContext should be of an OpenCL backend target
+ *
+ * @param[in] ctx A valid non-zero context
+ * @param[out] opencl_device Underlying OpenCL device used
+ *
+ * @return Status code
+ */
+AclStatus AclGetClDevice(AclContext ctx, cl_device_id *opencl_device);
+
+/** Set the underlying OpenCL context to be used by a given Compute Library context object
*
* @note @ref AclContext should be of an OpenCL backend target
*
@@ -63,6 +73,30 @@ AclStatus AclGetClContext(AclContext ctx, cl_context *opencl_context);
*/
AclStatus AclSetClContext(AclContext ctx, cl_context opencl_context);
+/** Extract the underlying OpenCL queue used by a given Compute Library queue object
+ *
+ * @note @ref AclQueue should be of an OpenCL backend target
+ * @note @ref AclQueue refcount should be 0, meaning not used by other objects
+ *
+ * @param[in] queue A valid non-zero queue
+ * @param[out] opencl_queue Underlying OpenCL queue used
+ *
+ * @return Status code
+ */
+AclStatus AclGetClQueue(AclQueue queue, cl_command_queue *opencl_queue);
+
+/** Set the underlying OpenCL queue to be used by a given Compute Library queue object
+ *
+ * @note @ref AclQueue should be of an OpenCL backend target
+ * @note opecl_queue needs to be created from the same context that the AclContext that the queue will use
+ *
+ * @param[in] queue A valid non-zero queue object
+ * @param[out] opencl_queue Underlying OpenCL queue to be used
+ *
+ * @return Status code
+ */
+AclStatus AclSetClQueue(AclQueue queue, cl_command_queue opencl_queue);
+
/** Extract the underlying OpenCL memory object by a given Compute Library tensor object
*
* @param[in] tensor A valid non-zero tensor