An abstraction of a computational device: a CPU, a specific GPU card in the system, etc.
More...
An abstraction of a computational device: a CPU, a specific GPU card in the system, etc.
Most primitives are created to execute computations on one specific engine. The only exceptions are reorder primitives that transfer data between two different engines.
- See also
- Basic Concepts
◆ dnnl_engine_kind_t
Kinds of engines.
Enumerator |
---|
dnnl_any_engine | An unspecified engine.
|
dnnl_cpu | CPU engine.
|
dnnl_gpu | GPU engine.
|
◆ dnnl_engine_get_count()
Returns the number of engines of a particular kind.
- Parameters
-
kind | Kind of engines to count. |
- Returns
- Count of the engines.
◆ dnnl_engine_create()
◆ dnnl_engine_create_ocl()
Creates an engine associated with an OpenCL device and an OpenCL context.
- Parameters
-
engine | Output engine. |
kind | Engine kind. |
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_engine_get_kind()
Returns the kind of an engine.
- Parameters
-
engine | Engine to query. |
kind | Output engine kind. |
- Returns
- dnnl_success on success and a status describing the error otherwise.
◆ dnnl_engine_get_ocl_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_engine_get_ocl_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_engine_destroy()