19 #include "cldnn_defs.h" 56 bool profiling =
false,
57 bool decorate_kernel_names =
false,
59 const std::string& options = std::string(),
60 const std::string& single_kernel = std::string(),
61 bool primitives_parallelisation =
false,
89 operator ::cldnn_engine_configuration()
const 122 :_impl(check_status<::
cldnn_engine>(
"failed to create engine", [&](status_t* status)
137 if (_impl == other._impl)
return *
this;
149 friend bool operator==(
const engine& lhs,
const engine& rhs) {
return lhs._impl == rhs._impl; }
150 friend bool operator!=(
const engine& lhs,
const engine& rhs) {
return !(lhs == rhs); }
155 return check_status<uint32_t>(
"engine_count failed", [=](status_t* status)
164 return check_status<engine_info>(
"engine_count failed", [=](status_t* status)
173 return check_status<engine_types>(
"engine_count failed", [=](status_t* status)
188 if (_impl ==
nullptr)
throw std::invalid_argument(
"implementation pointer should not be null");
194 check_status<void>(
"retain engine failed", [=](status_t* status) {
cldnn_retain_engine(_impl, status); });
198 check_status<void>(
"release engine failed", [=](status_t* status) {
cldnn_release_engine(_impl, status); });
201 CLDNN_API_CLASS(engine)
engine(engine_types type, uint32_t engine_num, const engine_configuration &configuration=engine_configuration())
Construct engine of the specified type, engine_num, and configuration options.
CLDNN_API int32_t cldnn_get_engine_type(cldnn_engine engine, cldnn_status *status)
Returns the cldnn_engine_type for the particular engine.
Represents an clDNN Event object.
const bool meaningful_kernels_names
Generate meaniful names fo OpenCL kernels.
CLDNN_API void cldnn_release_engine(cldnn_engine engine, cldnn_status *status)
Decrement reference counter for the engine object. Deletes object when counter becomes zero...
engine_configuration(bool profiling=false, bool decorate_kernel_names=false, bool dump_custom_program=false, const std::string &options=std::string(), const std::string &single_kernel=std::string(), bool primitives_parallelisation=false, const std::string &engine_log=std::string(), const std::string &sources_dumps_dir=std::string(), uint32_t priority_mode=0)
Constructs engine configuration with specified options.
const std::string compiler_options
OpenCL compiler options string.
struct cldnn_engine_impl * cldnn_engine
Engine object.
engine(const engine_configuration &configuration=engine_configuration())
Constructs OpenCL engine.
CLDNN_API uint32_t cldnn_get_engine_count(int32_t type, cldnn_status *status)
number of available engines of the particular type
const bool enable_parallelisation
Enables parallel execution of primitives which don't depend on each other. Disabled by default...
const std::string sources_dumps_dir
Specifies a directory where sources of cldnn::program objects should be dumped. Empty by default (mea...
const bool dump_custom_program
Dump the user OpenCL programs to files.
engine_types get_type() const
Returns type of the engine.
engine_info get_info() const
Returns information about properties and capabilities for the engine.
engine_types
Defines available engine types.
const bool enable_profiling
Enable per-primitive profiling.
Information about the engine returned by cldnn_get_engine_info().
static uint32_t engine_count(engine_types type)
Returns number of available engines of the particular type.
const uint32_t priority_mode
Placeholder for priority mode (support of priority hints in command queue). Currently ignored...
Configuration parameters for created engine.
const std::string engine_log
Specifies a file to which engine log should be dumped. Empty by default (means no logging)...
CLDNN_API void cldnn_retain_engine(cldnn_engine engine, cldnn_status *status)
Increment reference counter for the engine object.
CLDNN_API cldnn_engine cldnn_create_engine(int32_t type, uint32_t engine_num, const cldnn_engine_configuration *configuration, cldnn_status *status)
Create new engine of the specified type, engine_num, and configuration options.
CLDNN_API cldnn_engine_info cldnn_get_engine_info(cldnn_engine engine, cldnn_status *status)
Returns engine information. See cldnn_engine_info for details.
Executable network allocated from program.
Represents clDNN engine object.
Represents buffer with particular layout.
const std::string single_kernel_name
If provided, runs specific layer.
Configuration parameters for created engine.