[llvm] [Offload] Implement the remaining initial Offload API (PR #122106)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 05:07:07 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Callum Fare (callumfare)
<details>
<summary>Changes</summary>
Implement the complete initial version of the Offload API, to the extent that is usable for simple offloading programs. Tested with a basic SYCL program.
---
Patch is 127.26 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/122106.diff
31 Files Affected:
- (modified) offload/liboffload/API/Common.td (+20)
- (added) offload/liboffload/API/Enqueue.td (+82)
- (added) offload/liboffload/API/Event.td (+41)
- (added) offload/liboffload/API/Kernel.td (+62)
- (added) offload/liboffload/API/Memory.td (+48)
- (modified) offload/liboffload/API/OffloadAPI.td (+6)
- (added) offload/liboffload/API/Program.td (+44)
- (added) offload/liboffload/API/Queue.td (+52)
- (modified) offload/liboffload/include/generated/OffloadAPI.h (+806)
- (modified) offload/liboffload/include/generated/OffloadEntryPoints.inc (+913)
- (modified) offload/liboffload/include/generated/OffloadFuncs.inc (+42)
- (modified) offload/liboffload/include/generated/OffloadImplFuncDecls.inc (+64)
- (modified) offload/liboffload/include/generated/OffloadPrint.hpp (+325)
- (modified) offload/liboffload/src/OffloadImpl.cpp (+358)
- (modified) offload/plugins-nextgen/common/include/GlobalHandler.h (+3-2)
- (modified) offload/plugins-nextgen/cuda/src/rtl.cpp (+28)
- (modified) offload/plugins-nextgen/host/src/rtl.cpp (+2-2)
- (modified) offload/tools/offload-tblgen/PrintGen.cpp (+33-2)
- (modified) offload/tools/offload-tblgen/RecordTypes.hpp (+2)
- (modified) offload/unittests/OffloadAPI/CMakeLists.txt (+11-1)
- (modified) offload/unittests/OffloadAPI/common/Fixtures.hpp (+17-1)
- (added) offload/unittests/OffloadAPI/enqueue/olEnqueueDataCopy.cpp (+36)
- (added) offload/unittests/OffloadAPI/enqueue/olEnqueueDataRead.cpp (+29)
- (added) offload/unittests/OffloadAPI/enqueue/olEnqueueDataWrite.cpp (+23)
- (added) offload/unittests/OffloadAPI/memory/olMemAlloc.cpp (+45)
- (added) offload/unittests/OffloadAPI/memory/olMemFree.cpp (+47)
- (modified) offload/unittests/OffloadAPI/platform/olPlatformInfo.hpp (+1)
- (added) offload/unittests/OffloadAPI/queue/olCreateQueue.cpp (+28)
- (added) offload/unittests/OffloadAPI/queue/olFinishQueue.cpp (+17)
- (added) offload/unittests/OffloadAPI/queue/olReleaseQueue.cpp (+21)
- (added) offload/unittests/OffloadAPI/queue/olRetainQueue.cpp (+18)
``````````diff
diff --git a/offload/liboffload/API/Common.td b/offload/liboffload/API/Common.td
index 5b19d1d47129ef0..7fedb2002f157ea 100644
--- a/offload/liboffload/API/Common.td
+++ b/offload/liboffload/API/Common.td
@@ -62,6 +62,26 @@ def : Handle {
let desc = "Handle of context object";
}
+def : Handle {
+ let name = "ol_queue_handle_t";
+ let desc = "Handle of queue object";
+}
+
+def : Handle {
+ let name = "ol_event_handle_t";
+ let desc = "Handle of event object";
+}
+
+def : Handle {
+ let name = "ol_program_handle_t";
+ let desc = "Handle of program object";
+}
+
+def : Handle {
+ let name = "ol_kernel_handle_t";
+ let desc = "Handle of kernel object";
+}
+
def : Enum {
let name = "ol_errc_t";
let desc = "Defines Return/Error codes";
diff --git a/offload/liboffload/API/Enqueue.td b/offload/liboffload/API/Enqueue.td
new file mode 100644
index 000000000000000..d9215e8175ef8a3
--- /dev/null
+++ b/offload/liboffload/API/Enqueue.td
@@ -0,0 +1,82 @@
+//===-- Enqueue.td - Enqueue definitions for Offload -------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains Offload API definitions related to enqueable operations
+//
+//===----------------------------------------------------------------------===//
+
+def : Function {
+ let name = "olEnqueueDataWrite";
+ let desc = "Enqueue a write operation from host to device memory";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>,
+ Param<"void*", "SrcPtr", "host pointer to copy from", PARAM_IN>,
+ Param<"void*", "DstPtr", "device pointer to copy to", PARAM_IN>,
+ Param<"size_t", "Size", "size in bytes of data to copy", PARAM_IN>,
+ Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olEnqueueDataRead";
+ let desc = "Enqueue a read operation from device to host memory";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>,
+ Param<"void*", "SrcPtr", "device pointer to copy from", PARAM_IN>,
+ Param<"void*", "DstPtr", "host pointer to copy to", PARAM_IN>,
+ Param<"size_t", "Size", "size in bytes of data to copy", PARAM_IN>,
+ Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olEnqueueDataCopy";
+ let desc = "Enqueue a write operation between device allocations";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>,
+ Param<"void*", "SrcPtr", "device pointer to copy from", PARAM_IN>,
+ Param<"void*", "DstPtr", "device pointer to copy to", PARAM_IN>,
+ Param<"ol_device_handle_t", "DstDevice", "device that the destination pointer is resident on", PARAM_IN>,
+ Param<"size_t", "Size", "size in bytes of data to copy", PARAM_IN>,
+ Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>
+ ];
+ let returns = [];
+}
+
+
+def : Struct {
+ let name = "ol_kernel_launch_size_args_t";
+ let desc = "Size-related arguments for a kernel launch.";
+ let members = [
+ StructMember<"size_t", "Dimensions", "Number of work dimensions">,
+ StructMember<"size_t", "NumGroupsX", "Number of work groups on the X dimension">,
+ StructMember<"size_t", "NumGroupsY", "Number of work groups on the Y dimension">,
+ StructMember<"size_t", "NumGroupsZ", "Number of work groups on the Z dimension">,
+ StructMember<"size_t", "GroupSizeX", "Size of a work group on the X dimension.">,
+ StructMember<"size_t", "GroupSizeY", "Size of a work group on the Y dimension.">,
+ StructMember<"size_t", "GroupSizeZ", "Size of a work group on the Z dimension.">
+ ];
+}
+
+def : Function {
+ let name = "olEnqueueKernelLaunch";
+ let desc = "Enqueue a kernel launch with the specified size and parameters";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>,
+ Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>,
+ Param<"const ol_kernel_launch_size_args_t*", "LaunchSizeArgs", "pointer to the struct containing launch size parameters", PARAM_IN>,
+ Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>
+ ];
+ let returns = [];
+}
diff --git a/offload/liboffload/API/Event.td b/offload/liboffload/API/Event.td
new file mode 100644
index 000000000000000..db90a7c8e2be43b
--- /dev/null
+++ b/offload/liboffload/API/Event.td
@@ -0,0 +1,41 @@
+//===-- Event.td - Event definitions for Offload -----------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains Offload API definitions related to the event handle
+//
+//===----------------------------------------------------------------------===//
+
+def : Function {
+ let name = "olRetainEvent";
+ let desc = "Increment the reference count of the given event";
+ let details = [];
+ let params = [
+ Param<"ol_event_handle_t", "Event", "handle of the event", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olReleaseEvent";
+ let desc = "Decrement the reference count of the given event";
+ let details = [];
+ let params = [
+ Param<"ol_event_handle_t", "Event", "handle of the event", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olWaitEvent";
+ let desc = "Wait for the event to be complete";
+ let details = [];
+ let params = [
+ Param<"ol_event_handle_t", "Event", "handle of the event", PARAM_IN>
+ ];
+ let returns = [];
+}
diff --git a/offload/liboffload/API/Kernel.td b/offload/liboffload/API/Kernel.td
new file mode 100644
index 000000000000000..4c8c84e9c71de89
--- /dev/null
+++ b/offload/liboffload/API/Kernel.td
@@ -0,0 +1,62 @@
+def : Function {
+ let name = "olCreateKernel";
+ let desc = "";
+ let details = [];
+ let params = [
+ Param<"ol_program_handle_t", "Program", "handle of the program", PARAM_IN>,
+ Param<"const char*", "KernelName", "name of the kernel entry point in the program", PARAM_IN>,
+ Param<"ol_kernel_handle_t*", "Kernel", "output pointer for the created kernel", PARAM_OUT>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olRetainKernel";
+ let desc = "Increment the reference count of the given kernel";
+ let details = [];
+ let params = [
+ Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olReleaseKernel";
+ let desc = "Decrement the reference count of the given kernel";
+ let details = [];
+ let params = [
+ Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olSetKernelArgValue";
+ let desc = "Set the value of a single kernel argument at the given index";
+ let details = [
+ "The implementation will construct and lay out the backing storage for the kernel arguments."
+ "The effects of calls to this function on a kernel are lost if olSetKernelArgsData is called."
+ ];
+ let params = [
+ Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>,
+ Param<"uint32_t", "Index", "index of the argument", PARAM_IN>,
+ Param<"size_t", "Size", "size of the argument data", PARAM_IN>,
+ Param<"void*", "ArgData", "pointer to the argument data", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olSetKernelArgsData";
+ let desc = "Set the entire argument data for a kernel";
+ let details = [
+ "Previous calls to olSetKernelArgValue on the same kernel are invalidated by this function"
+ "The data pointed to by ArgsData is assumed to be laid out correctly according to the requirements of the backend API"
+ ];
+ let params = [
+ Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>,
+ Param<"void*", "ArgsData", "pointer to the argument data", PARAM_IN>,
+ Param<"size_t", "ArgsDataSize", "size of the argument data", PARAM_IN>
+ ];
+ let returns = [];
+}
diff --git a/offload/liboffload/API/Memory.td b/offload/liboffload/API/Memory.td
new file mode 100644
index 000000000000000..2c3f4c83980d030
--- /dev/null
+++ b/offload/liboffload/API/Memory.td
@@ -0,0 +1,48 @@
+//===-- Memory.td - Memory definitions for Offload ---------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains Offload API definitions related to memory allocations
+//
+//===----------------------------------------------------------------------===//
+
+def : Enum {
+ let name = "ol_alloc_type_t";
+ let desc = "Represents the type of allocation made with olMemAlloc";
+ let etors = [
+ Etor<"HOST", "Host allocation">,
+ Etor<"DEVICE", "Device allocation">,
+ Etor<"SHARED", "Shared allocation">
+ ];
+}
+
+def : Function {
+ let name = "olMemAlloc";
+ let desc = "Creates a memory allocation on the specified device";
+ let params = [
+ Param<"ol_device_handle_t", "Device", "handle of the device to allocate on", PARAM_IN>,
+ Param<"ol_alloc_type_t", "Type", "type of the allocation", PARAM_IN>,
+ Param<"size_t", "Size", "size of the allocation in bytes", PARAM_IN>,
+ Param<"void**", "AllocationOut", "output for the allocated pointer", PARAM_OUT>
+ ];
+ let returns = [
+ Return<"OL_ERRC_INVALID_SIZE", [
+ "`Size == 0`"
+ ]>
+ ];
+}
+
+def : Function {
+ let name = "olMemFree";
+ let desc = "Frees a memory allocation previously made by olMemAlloc";
+ let params = [
+ Param<"ol_device_handle_t", "Device", "handle of the device to allocate on", PARAM_IN>,
+ Param<"ol_alloc_type_t", "Type", "type of the allocation", PARAM_IN>,
+ Param<"void*", "Address", "address of the allocation to free", PARAM_IN>,
+ ];
+ let returns = [];
+}
diff --git a/offload/liboffload/API/OffloadAPI.td b/offload/liboffload/API/OffloadAPI.td
index 8a0c3c405812232..f2822b93e6bf8f6 100644
--- a/offload/liboffload/API/OffloadAPI.td
+++ b/offload/liboffload/API/OffloadAPI.td
@@ -13,3 +13,9 @@ include "APIDefs.td"
include "Common.td"
include "Platform.td"
include "Device.td"
+include "Memory.td"
+include "Queue.td"
+include "Event.td"
+include "Enqueue.td"
+include "Program.td"
+include "Kernel.td"
diff --git a/offload/liboffload/API/Program.td b/offload/liboffload/API/Program.td
new file mode 100644
index 000000000000000..684a6581320f8d5
--- /dev/null
+++ b/offload/liboffload/API/Program.td
@@ -0,0 +1,44 @@
+//===-- Program.td - Program definitions for Offload -------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains Offload API definitions related to the program handle
+//
+//===----------------------------------------------------------------------===//
+
+def : Function {
+ let name = "olCreateProgram";
+ let desc = "";
+ let details = [];
+ let params = [
+ Param<"ol_device_handle_t", "Device", "handle of the device", PARAM_IN>,
+ Param<"void*", "ProgData", "pointer to the program binary data", PARAM_IN>,
+ Param<"size_t", "ProgDataSize", "size of the program binary in bytes", PARAM_IN>,
+ Param<"ol_program_handle_t*", "Queue", "output pointer for the created program", PARAM_OUT>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olRetainProgram";
+ let desc = "Create a queue for the given device";
+ let details = [];
+ let params = [
+ Param<"ol_program_handle_t", "Program", "handle of the program", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olReleaseProgram";
+ let desc = "Create a queue for the given device";
+ let details = [];
+ let params = [
+ Param<"ol_program_handle_t", "Program", "handle of the program", PARAM_IN>
+ ];
+ let returns = [];
+}
diff --git a/offload/liboffload/API/Queue.td b/offload/liboffload/API/Queue.td
new file mode 100644
index 000000000000000..5629fa40d56d5f3
--- /dev/null
+++ b/offload/liboffload/API/Queue.td
@@ -0,0 +1,52 @@
+//===-- Queue.td - Queue definitions for Offload -----------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains Offload API definitions related to the queue handle
+//
+//===----------------------------------------------------------------------===//
+
+def : Function {
+ let name = "olCreateQueue";
+ let desc = "Create a queue for the given device";
+ let details = [];
+ let params = [
+ Param<"ol_device_handle_t", "Device", "handle of the device", PARAM_IN>,
+ Param<"ol_queue_handle_t*", "Queue", "output pointer for the created queue", PARAM_OUT>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olRetainQueue";
+ let desc = "Create a queue for the given device";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olReleaseQueue";
+ let desc = "Create a queue for the given device";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>
+ ];
+ let returns = [];
+}
+
+def : Function {
+ let name = "olFinishQueue";
+ let desc = "Wait for the enqueued work on a queue to complete";
+ let details = [];
+ let params = [
+ Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>
+ ];
+ let returns = [];
+}
diff --git a/offload/liboffload/include/generated/OffloadAPI.h b/offload/liboffload/include/generated/OffloadAPI.h
index 11fcc96625ab8dd..950c0e37ae67c4e 100644
--- a/offload/liboffload/include/generated/OffloadAPI.h
+++ b/offload/liboffload/include/generated/OffloadAPI.h
@@ -85,6 +85,22 @@ typedef struct ol_device_handle_t_ *ol_device_handle_t;
/// @brief Handle of context object
typedef struct ol_context_handle_t_ *ol_context_handle_t;
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Handle of queue object
+typedef struct ol_queue_handle_t_ *ol_queue_handle_t;
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Handle of event object
+typedef struct ol_event_handle_t_ *ol_event_handle_t;
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Handle of program object
+typedef struct ol_program_handle_t_ *ol_program_handle_t;
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Handle of kernel object
+typedef struct ol_kernel_handle_t_ *ol_kernel_handle_t;
+
///////////////////////////////////////////////////////////////////////////////
/// @brief Defines Return/Error codes
typedef enum ol_errc_t {
@@ -460,6 +476,459 @@ OL_APIEXPORT ol_result_t OL_APICALL olGetDeviceInfoSize(
// [out] pointer to the number of bytes required to store the query
size_t *PropSizeRet);
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Represents the type of allocation made with olMemAlloc
+typedef enum ol_alloc_type_t {
+ /// Host allocation
+ OL_ALLOC_TYPE_HOST = 0,
+ /// Device allocation
+ OL_ALLOC_TYPE_DEVICE = 1,
+ /// Shared allocation
+ OL_ALLOC_TYPE_SHARED = 2,
+ /// @cond
+ OL_ALLOC_TYPE_FORCE_UINT32 = 0x7fffffff
+ /// @endcond
+
+} ol_alloc_type_t;
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Creates a memory allocation on the specified device
+///
+/// @details
+///
+/// @returns
+/// - ::OL_RESULT_SUCCESS
+/// - ::OL_ERRC_UNINITIALIZED
+/// - ::OL_ERRC_DEVICE_LOST
+/// - ::OL_ERRC_INVALID_SIZE
+/// + `Size == 0`
+/// - ::OL_ERRC_INVALID_NULL_HANDLE
+/// + `NULL == Device`
+/// - ::OL_ERRC_INVALID_NULL_POINTER
+/// + `NULL == AllocationOut`
+OL_APIEXPORT ol_result_t OL_APICALL olMemAlloc(
+ // [in] handle of the device to allocate on
+ ol_device_handle_t Device,
+ // [in] type of the allocation
+ ol_alloc_type_t Type,
+ // [in] size of the allocation in bytes
+ size_t Size,
+ // [out] output for the allocated pointer
+ void **AllocationOut);
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Frees a memory allocation previously made by olMemAlloc
+///
+/// @details
+///
+/// @returns
+/// - ::OL_RESULT_SUCCESS
+/// - ::OL_ERRC_UNINITIALIZED
+/// - ::OL_ERRC_DEVICE_LOST
+/// - ::OL_ERRC_INVALID_NULL_HANDLE
+/// + `NULL == Device`
+/// - ::OL_ERRC_INVALID_NULL_POINTER
+/// + `NULL == Address`
+OL_APIEXPORT ol_result_t OL_APICALL olMemFree(
+ // [in] handle of the device to allocate on
+ ol_device_handle_t Device,
+ // [in] type of the allocation
+ ol_alloc_type_t Type,
+ // [in] address of the allocation to free
+ void *Address);
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Create a queue for the given device
+///
+/// @details
+///
+/// @returns
+/// - ::OL_RESULT_SUCCESS
+/// - ::OL_ERRC_UNINITIALIZED
+/// - ::OL_ERRC_DEVICE_LOST
+/// - ::OL_ERRC_INVALID_NULL_HANDLE
+/// + `NULL == Device`
+/// - ::OL_ERRC_INVALID_NULL_POINTER
+/// + `NULL == Queue`
+OL_APIEXPORT ol_result_t OL_APICALL olCreateQueue(
+ // [in] handle of the device
+ ol_device_handle_t Device,
+ // [out] output pointer for the created queue
+ ol_queue_handle_t *Queue);
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Create a queue for the given device
+///
+/// @details
+///
+/// @returns
+/// - ::OL_RESULT_SUCCESS
+/// - ::OL_ERRC_UNINITIALIZED
+/// - ::OL_ERRC_DEVICE_LOST
+/// - ::OL_ERRC_INVALID_NULL_HANDLE
+/// + `NULL == Queue`
+/// - ::OL_ERRC_INVALID_NULL_POINTER
+OL_APIEXPORT ol_result_t OL_APICALL olRetainQueue(
+ // [in] handle of the queue
+ ol_queue_handle_t Queue);
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Create a queue for the given device
+///
+/// @details
+///
+/// @returns
+/// - ::OL_RESULT_SUCCESS
+/// - ::OL_ERRC_UNINITIALIZED
+/// - ::OL_ERRC_DEVICE_LOST
+/// - ::OL_ERRC_INVALID_NULL_HANDLE
+/// + `NULL == Queue`
+/// - ::OL_ERRC_INVALID_NULL_POINTER
+OL_APIEXPORT ol_result_t OL_APICALL olReleaseQueue(
+ // [in] handle of the queue
+ ol_queue_handle_t Queue);
+
+///////////////////////////////////////////////////////////////////////////////
+/// @brief Wait for the enq...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/122106
More information about the llvm-commits
mailing list