API extensions to interact with the underlying OpenCL run-time.
More...
API extensions to interact with the underlying OpenCL run-time.
- See also
- OpenCL Interoperability in developer guide
◆ dnnl_ocl_interop_memory_get_mem_object()
Returns an OpenCL memory object associated with a memory object.
- Parameters
-
memory | Memory object. |
mem_object | Output OpenCL memory object. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_ocl_interop_memory_set_mem_object()
Sets OpenCL memory object associated with a memory object.
For behavioral details, see dnnl_memory_set_data_handle().
- Parameters
-
memory | Memory object. |
mem_object | OpenCL memory object. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_ocl_interop_engine_create()
Creates an engine associated with an OpenCL device and an OpenCL context.
- Parameters
-
engine | Output engine. |
device | Underlying OpenCL device to use for the engine. |
context | Underlying OpenCL context to use for the engine. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_ocl_interop_engine_get_context()
Returns the OpenCL context associated with an engine.
- Parameters
-
engine | Engine to query. |
context | Output underlying OpenCL context of the engine. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_ocl_interop_get_device()
Returns the OpenCL device associated with an engine.
- Parameters
-
engine | Engine to query. |
device | Output underlying OpenCL device of the engine. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_ocl_interop_stream_create()
Creates an execution stream for a given engine associated with an OpenCL command queue.
- Parameters
-
stream | Output execution stream. |
engine | Engine to create the execution stream on. |
queue | OpenCL command queue to use. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_ocl_interop_stream_get_command_queue()
Returns the OpenCL command queue associated with an execution stream.
- Parameters
-
stream | Execution stream to query. |
queue | Output OpenCL command queue. |
- Returns
- dnnl_success on success and a status describing the error otherwise.