Deep Neural Network Library (DNNL)  1.90.1
Performance library for Deep Learning
Public Types | Public Member Functions | List of all members
dnnl::stream Struct Reference

An execution stream. More...

#include <dnnl.hpp>

Inheritance diagram for dnnl::stream:
Inheritance graph
[legend]
Collaboration diagram for dnnl::stream:
Collaboration graph
[legend]

Public Types

enum  flags : unsigned { flags::default_order = dnnl_stream_default_order, flags::in_order = dnnl_stream_default_order, flags::out_of_order = dnnl_stream_out_of_order, flags::default_flags = dnnl_stream_default_flags }
 Stream flags. More...
 

Public Member Functions

 stream (const engine &aengine, flags aflags=flags::default_flags)
 Constructs a stream.
 
 stream (const engine &eng, cl_command_queue queue)
 Constructs a stream associated with the engine eng and with the OpenCL command queue queue.
 
cl_command_queue get_ocl_command_queue () const
 Returns the OpenCL command queue associated with the stream.
 
DNNL_API stream (const engine &eng, cl::sycl::queue &aqueue)
 Constructs a stream for the specified engine and the SYCL queue. More...
 
cl::sycl::queue DNNL_API get_sycl_queue () const
 Returns the underlying SYCL queue object.
 
streamwait ()
 Waits for all primitives in the stream to finish.
 
 handle ()=default
 Empty constructor. More...
 
 handle (T t, bool weak=false)
 Constructs a C handle wrapper from a C handle. More...
 
- Public Member Functions inherited from dnnl::handle< dnnl_stream_t >
 handle ()=default
 Empty constructor. More...
 
 handle (dnnl_stream_t t, bool weak=false)
 Constructs a C handle wrapper from a C handle. More...
 
void reset (dnnl_stream_t t, bool weak=false)
 Resets the value of a C handle. More...
 
dnnl_stream_t get (bool allow_emtpy=false) const
 Returns the value of the underlying C handle.
 

Detailed Description

An execution stream.

Examples
cnn_inference_f32.cpp, cnn_inference_int8.cpp, cnn_training_f32.cpp, cpu_cnn_training_bf16.cpp, cpu_rnn_inference_f32.cpp, cpu_rnn_inference_int8.cpp, cross_engine_reorder.cpp, getting_started.cpp, gpu_opencl_interop.cpp, memory_format_propagation.cpp, performance_profiling.cpp, rnn_training_f32.cpp, and sycl_interop.cpp.

Member Enumeration Documentation

◆ flags

enum dnnl::stream::flags : unsigned
strong

Stream flags.

Enumerator
default_order 

Default order execution.

Either in-order or out-of-order depending on the engine runtime

in_order 

In-order execution.

out_of_order 

Out-of-order execution.

default_flags 

Default stream configuration.

Constructor & Destructor Documentation

◆ stream()

DNNL_API dnnl::stream::stream ( const engine eng,
cl::sycl::queue &  aqueue 
)

Constructs a stream for the specified engine and the SYCL queue.

Parameters
engEngine object to use for the stream.
aqueueSYCL queue to use for the stream.

Member Function Documentation

◆ handle() [1/2]

dnnl::handle< T, traits >::handle
default

Empty constructor.

Allows declaring an object before actual initialization (mostly for convenience).

Warning
Uninitialized object cannot be used in any library calls. Any attempt to use its methods or passing it to the other library function will lead to a thrown exception.

◆ handle() [2/2]

dnnl::handle< T, traits >::handle
inlineexplicit

Constructs a C handle wrapper from a C handle.

Parameters
tThe C handle to wrap.
weakA flag to specify whether to construct a weak wrapper.

The documentation for this struct was generated from the following file: