Performance library for Deep Learning
1.96.0
17 #ifndef ONEAPI_DNNL_DNNL_OCL_H
18 #define ONEAPI_DNNL_DNNL_OCL_H
24 #ifndef CL_TARGET_OPENCL_VERSION
25 #define CL_TARGET_OPENCL_VERSION 120
72 dnnl_engine_t *engine, cl_device_id device, cl_context context);
dnnl_status_t DNNL_API dnnl_ocl_interop_memory_set_mem_object(dnnl_memory_t memory, cl_mem mem_object)
Sets OpenCL memory object associated with a memory object.
dnnl_status_t
Status values returned by the library functions.
Definition: dnnl_types.h:39
An opaque structure to describe an engine.
dnnl_status_t DNNL_API dnnl_ocl_interop_engine_create(dnnl_engine_t *engine, cl_device_id device, cl_context context)
Creates an engine associated with an OpenCL device and an OpenCL context.
dnnl_status_t DNNL_API dnnl_ocl_interop_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, cl_command_queue queue)
Creates an execution stream for a given engine associated with an OpenCL command queue.
dnnl_status_t DNNL_API dnnl_ocl_interop_memory_get_mem_object(const_dnnl_memory_t memory, cl_mem *mem_object)
Returns an OpenCL memory object associated with a memory object.
dnnl_status_t DNNL_API dnnl_ocl_interop_stream_get_command_queue(dnnl_stream_t stream, cl_command_queue *queue)
Returns the OpenCL command queue associated with an execution stream.
dnnl_status_t DNNL_API dnnl_ocl_interop_engine_get_context(dnnl_engine_t engine, cl_context *context)
Returns the OpenCL context associated with an engine.
dnnl_status_t DNNL_API dnnl_ocl_interop_get_device(dnnl_engine_t engine, cl_device_id *device)
Returns the OpenCL device associated with an engine.