An encapsulation of execution context tied to a particular engine. More...
Classes | |
struct | dnnl::stream_attr |
A container for stream attributes. More... | |
struct | dnnl::stream |
An execution stream. More... | |
struct | dnnl_stream |
An opaque structure to describe an execution stream. More... | |
Typedefs | |
typedef struct dnnl_stream * | dnnl_stream_t |
An execution stream handle. | |
typedef const struct dnnl_stream * | const_dnnl_stream_t |
A constant execution stream handle. | |
typedef struct dnnl_stream_attr * | dnnl_stream_attr_t |
An execution stream attributes handle. | |
typedef const struct dnnl_stream_attr * | const_dnnl_stream_attr_t |
A constant execution stream attributes handle. | |
Enumerations | |
enum | dnnl_stream_flags_t |
Stream flags. More... | |
Functions | |
dnnl_status_t DNNL_API | dnnl_stream_attr_create (dnnl_stream_attr_t *attr, dnnl_engine_kind_t kind) |
Creates execution stream attributes for a stream that runs on an engine of a particular kind. More... | |
dnnl_status_t DNNL_API | dnnl_stream_attr_destroy (dnnl_stream_attr_t attr) |
Destroys execution stream attributes. More... | |
dnnl_status_t DNNL_API | dnnl_stream_create (dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags) |
Creates an execution stream. More... | |
dnnl_status_t DNNL_API | dnnl_stream_create_v2 (dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags, const_dnnl_stream_attr_t attr) |
Creates an execution stream. More... | |
dnnl_status_t DNNL_API | dnnl_stream_create_ocl (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. More... | |
dnnl_status_t DNNL_API | dnnl_stream_get_ocl_command_queue (dnnl_stream_t stream, cl_command_queue *queue) |
Returns the OpenCL command queue associated with an execution stream. More... | |
dnnl_status_t DNNL_API | dnnl_stream_wait (dnnl_stream_t stream) |
Waits for all primitives in the execution stream to finish computations. More... | |
dnnl_status_t DNNL_API | dnnl_stream_destroy (dnnl_stream_t stream) |
Destroys an execution stream. More... | |
An encapsulation of execution context tied to a particular engine.
enum dnnl_stream_flags_t |
dnnl_status_t DNNL_API dnnl_stream_attr_create | ( | dnnl_stream_attr_t * | attr, |
dnnl_engine_kind_t | kind | ||
) |
Creates execution stream attributes for a stream that runs on an engine of a particular kind.
attr | Output execution stream attributes. |
kind | Target engine kind. |
dnnl_status_t DNNL_API dnnl_stream_attr_destroy | ( | dnnl_stream_attr_t | attr | ) |
Destroys execution stream attributes.
attr | Execution stream attributes to destroy. |
dnnl_status_t DNNL_API dnnl_stream_create | ( | dnnl_stream_t * | stream, |
dnnl_engine_t | engine, | ||
unsigned | flags | ||
) |
Creates an execution stream.
stream | Output execution stream. |
engine | Engine to create the execution stream on. |
flags | Stream behavior flags ( |
dnnl_status_t DNNL_API dnnl_stream_create_v2 | ( | dnnl_stream_t * | stream, |
dnnl_engine_t | engine, | ||
unsigned | flags, | ||
const_dnnl_stream_attr_t | attr | ||
) |
Creates an execution stream.
stream | Output execution stream. |
engine | Engine to create the execution stream on. |
flags | Stream behavior flags ( |
attr | Stream attributes. |
dnnl_status_t DNNL_API dnnl_stream_create_ocl | ( | 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.
stream | Output execution stream. |
engine | Engine to create the execution stream on. |
queue | OpenCL command queue to use. |
dnnl_status_t DNNL_API dnnl_stream_get_ocl_command_queue | ( | dnnl_stream_t | stream, |
cl_command_queue * | queue | ||
) |
Returns the OpenCL command queue associated with an execution stream.
stream | Execution stream to query. |
queue | Output OpenCL command queue. |
dnnl_status_t DNNL_API dnnl_stream_wait | ( | dnnl_stream_t | stream | ) |
Waits for all primitives in the execution stream to finish computations.
stream | Execution stream. |
dnnl_status_t DNNL_API dnnl_stream_destroy | ( | dnnl_stream_t | stream | ) |
Destroys an execution stream.
stream | Execution stream to destroy. |