clDNN
|
Classes | |
struct | cldnn_profiling_interval |
Profiling information for an executed network primitive. More... | |
struct | cldnn_tuning_config |
Tuning config. More... | |
struct | cldnn_build_option |
Represents network build option. More... | |
struct | cldnn_network_output |
Output information for executed cldnn_network. More... | |
Typedefs | |
typedef struct cldnn_event_impl * | cldnn_event |
Event object. | |
typedef struct cldnn_network_impl * | cldnn_network |
Executable network allocated from cldnn_program. | |
typedef void(* | cldnn_event_handler) (void *) |
user-defined event handler callback. | |
Enumerations | |
enum | cldnn_build_option_type { cldnn_build_option_fusing, cldnn_build_option_optimize_data, cldnn_build_option_debug, cldnn_build_option_outputs, cldnn_build_option_tuning_config, cldnn_build_option_graph_dumps_dir } |
Network build option types. More... | |
enum | cldnn_tuning_mode_type { cldnn_tuning_disabled, cldnn_tuning_use_cache, cldnn_tuning_tune_and_cache } |
Tuning modes. More... | |
Functions | |
CLDNN_API cldnn_event | cldnn_create_user_event (cldnn_engine engine, cldnn_status *status) |
Creates an event which can be set by user. | |
CLDNN_API int32_t | cldnn_is_user_event (cldnn_event event, cldnn_status *status) |
Checks if an event was created by user. | |
CLDNN_API void | cldnn_retain_event (cldnn_event event, cldnn_status *status) |
Increment reference counter for the event object. | |
CLDNN_API void | cldnn_release_event (cldnn_event event, cldnn_status *status) |
Decrement reference counter for the event object. Deletes object when counter becomes zero. | |
CLDNN_API void | cldnn_wait_for_event (cldnn_event event, cldnn_status *status) |
Waits for event completion or error. | |
CLDNN_API void | cldnn_set_event (cldnn_event event, cldnn_status *status) |
Set event status to completed . | |
CLDNN_API void | cldnn_add_event_handler (cldnn_event event, cldnn_event_handler handler, void *param, cldnn_status *status) |
Register call back to be called on event completion. More... | |
CLDNN_API void | cldnn_get_event_profiling_info (cldnn_event event, cldnn_profiling_interval *profiling, size_t size, size_t *size_ret, cldnn_status *status) |
Returns the profiling information for an network primitive associated with event. More... | |
CLDNN_API cldnn_network | cldnn_build_network (cldnn_engine engine, cldnn_topology topology, cldnn_build_option *options, size_t options_num, cldnn_status *status) |
Builds and allocates executable network based on user-defined topology by specified engine . This is a shorthand for cldnn_build_program and cldnn_allocate_network. More... | |
CLDNN_API cldnn_network | cldnn_allocate_network (cldnn_program program, cldnn_status *status) |
Allocates memory for a new network which will be able to execute specified program . More... | |
CLDNN_API void | cldnn_retain_network (cldnn_network network, cldnn_status *status) |
Increment reference counter for the network object. | |
CLDNN_API void | cldnn_release_network (cldnn_network network, cldnn_status *status) |
Decrement reference counter for the network object. Deletes object when counter becomes zero. | |
CLDNN_API void | cldnn_set_network_input (cldnn_network network, cldnn_primitive_id id, cldnn_memory mem, cldnn_status *status) |
Provides user input data to the network (for input_layout primitives). More... | |
CLDNN_API void | cldnn_get_primitive_info (cldnn_network network, cldnn_primitive_id id, char *info, size_t size, size_t *size_ret, cldnn_status *status) |
Returns information about particular primitive. More... | |
CLDNN_API cldnn_engine | cldnn_get_network_engine (cldnn_network network, cldnn_status *status) |
Returns engine associated with the network . | |
CLDNN_API cldnn_program | cldnn_get_network_program (cldnn_network network, cldnn_status *status) |
Returns program associated with the network . | |
CLDNN_API void | cldnn_get_network_output_names (cldnn_network network, char *names, size_t size, size_t *size_ret, cldnn_status *status) |
Returns names of network outputs. More... | |
CLDNN_API void | cldnn_get_network_executed_primitive_names (cldnn_network network, char *names, size_t size, size_t *size_ret, cldnn_status *status) |
Returns names of executed primitives. More... | |
CLDNN_API void | cldnn_get_network_all_primitive_names (cldnn_network network, char *names, size_t size, size_t *size_ret, cldnn_status *status) |
Returns names of all primitives in network. More... | |
CLDNN_API void | cldnn_get_network_all_primitive_org_names (cldnn_network network, char *names, size_t size, size_t *size_ret, cldnn_status *status) |
Returns names of all primitives in network before graph optimization. More... | |
CLDNN_API void | cldnn_execute_network (cldnn_network network, cldnn_event *dependencies, size_t deps_num, cldnn_status *status) |
Executes network. More... | |
CLDNN_API cldnn_network_output | cldnn_get_network_output (cldnn_network network, const char *name, cldnn_status *status) |
Returns executed network output information. More... | |
CLDNN_API cldnn_memory | cldnn_get_network_output_memory (cldnn_network network, const char *name, cldnn_status *status) |
Returns memory corresponding to output with name . More... | |
CLDNN_API cldnn_event | cldnn_get_network_output_event (cldnn_network network, const char *name, cldnn_status *status) |
Returns event corresponding to output with name . More... | |
struct cldnn_profiling_interval |
Profiling information for an executed network primitive.
Every cldnn_event associated with cldnn_network_output. can contain one or more profiling information intervals.
Class Members | ||
---|---|---|
const char * | name | Profiling interval name. |
uint64_t | nanoseconds |
struct cldnn_tuning_config |
Class Members | ||
---|---|---|
const char * | cache_file_path | A path to the tuning cache file. |
const int32_t | mode | cldnn_tuning_mode_type. |
struct cldnn_build_option |
Class Members | ||
---|---|---|
const void * | data | option parameter - e.g list of outputs. |
int32_t | type | cldnn_build_option_type. |
struct cldnn_network_output |
Output information for executed cldnn_network.
User should wait for event before accessing the memory.
Class Members | ||
---|---|---|
cldnn_event | event | Event to be waited. |
cldnn_memory | memory |
Output memory. User should wait for the event before access this field. |
Network build option types.
CLDNN_API void cldnn_add_event_handler | ( | cldnn_event | event, |
cldnn_event_handler | handler, | ||
void * | param, | ||
cldnn_status * | status | ||
) |
Register call back to be called on event completion.
[in] | handler | Pointer to cldnn_event_handler call-back function. |
[in] | param | user-defined value to be passed to the call back function. |
CLDNN_API cldnn_network cldnn_allocate_network | ( | cldnn_program | program, |
cldnn_status * | status | ||
) |
Allocates memory for a new network which will be able to execute specified program
.
[in] | program | The program object which holds binaries compiled from some topology and engine. Multiple network objects can share the same program. |
CLDNN_API cldnn_network cldnn_build_network | ( | cldnn_engine | engine, |
cldnn_topology | topology, | ||
cldnn_build_option * | options, | ||
size_t | options_num, | ||
cldnn_status * | status | ||
) |
Builds and allocates executable network based on user-defined topology
by specified engine
. This is a shorthand for cldnn_build_program and cldnn_allocate_network.
[in] | engine | The engine which will be used to build the metwork. |
[in] | topology | The user-defined topology on which the network will be based. |
[in] | options | The pointer of array of cldnn_build_option which define network build options. |
[in] | options_num | Number of elements in the options array. |
CLDNN_API void cldnn_execute_network | ( | cldnn_network | network, |
cldnn_event * | dependencies, | ||
size_t | deps_num, | ||
cldnn_status * | status | ||
) |
Executes network.
User should call cldnn_set_network_input() for every input_layout
defined in tho source topology
. Function returns immediately, even if dependencies
are not set yet. dependencies Pointer to an array of cldnn_events to be waited for network execution.
deps_num | Number of elements in the dependencies array. |
CLDNN_API void cldnn_get_event_profiling_info | ( | cldnn_event | event, |
cldnn_profiling_interval * | profiling, | ||
size_t | size, | ||
size_t * | size_ret, | ||
cldnn_status * | status | ||
) |
Returns the profiling information for an network primitive associated with event.
[in] | profiling | Pointer to the array of cldnn_profiling_interval where information to be stored. |
[in] | size | Number of elements in the array of cldnn_profiling_interval. |
[out] | size_ret | Number of elements required to store profiling information. |
CLDNN_API void cldnn_get_network_all_primitive_names | ( | cldnn_network | network, |
char * | names, | ||
size_t | size, | ||
size_t * | size_ret, | ||
cldnn_status * | status | ||
) |
Returns names of all primitives in network.
Function fills user provided buffer by primitive names. Each name is followed by '\0'. Empty name "\0\0" means end of data.
[in] | names | Pointer to user-allocated buffer to store names. |
[in] | size | Size (in chars) of the buffer. |
[out] | size_ret | Required size (in chars) to store result. |
CLDNN_API void cldnn_get_network_all_primitive_org_names | ( | cldnn_network | network, |
char * | names, | ||
size_t | size, | ||
size_t * | size_ret, | ||
cldnn_status * | status | ||
) |
Returns names of all primitives in network before graph optimization.
Function fills user provided buffer by primitive names. Each name is followed by '\0'. Empty name "\0\0" means end of data.
[in] | names | Pointer to user-allocated buffer to store names. |
[in] | size | Size (in chars) of the buffer. |
[out] | size_ret | Required size (in chars) to store result. |
CLDNN_API void cldnn_get_network_executed_primitive_names | ( | cldnn_network | network, |
char * | names, | ||
size_t | size, | ||
size_t * | size_ret, | ||
cldnn_status * | status | ||
) |
Returns names of executed primitives.
Function fills user provided buffer by primitive names. Each name is followed by '\0'. Empty name "\0\0" means end of data.
[in] | names | Pointer to user-allocated buffer to store names. |
[in] | size | Size (in chars) of the buffer. |
[out] | size_ret | Required size (in chars) to store result. |
CLDNN_API cldnn_network_output cldnn_get_network_output | ( | cldnn_network | network, |
const char * | name, | ||
cldnn_status * | status | ||
) |
Returns executed network output information.
User should call this function after cldnn_execute_network() to get result of network execution.
name | Output name to get the result. |
CLDNN_API cldnn_event cldnn_get_network_output_event | ( | cldnn_network | network, |
const char * | name, | ||
cldnn_status * | status | ||
) |
Returns event corresponding to output with name
.
User can call this function even before calling cldnn_execute_network(), but then content of memory is uninitialized.
name | Output name to get the result. |
CLDNN_API cldnn_memory cldnn_get_network_output_memory | ( | cldnn_network | network, |
const char * | name, | ||
cldnn_status * | status | ||
) |
Returns memory corresponding to output with name
.
User can call this function even before calling cldnn_execute_network(), but then content of memory is uninitialized.
name | Output name to get the result. |
CLDNN_API void cldnn_get_network_output_names | ( | cldnn_network | network, |
char * | names, | ||
size_t | size, | ||
size_t * | size_ret, | ||
cldnn_status * | status | ||
) |
Returns names of network outputs.
Function fills user provided buffer by primitive names. Each name is followed by '\0'. Empty name "\0\0" means end of data.
[in] | names | Pointer to user-allocated buffer to store names. |
[in] | size | Size (in chars) of the buffer. |
[out] | size_ret | Required size (in chars) to store result. |
CLDNN_API void cldnn_get_primitive_info | ( | cldnn_network | network, |
cldnn_primitive_id | id, | ||
char * | info, | ||
size_t | size, | ||
size_t * | size_ret, | ||
cldnn_status * | status | ||
) |
Returns information about particular primitive.
Function fills user provided buffer by primitive description.
[in] | id | Primitive id of input_layout primitive defined in topology . |
[in] | info | Pointer to user-allocated buffer to store names. |
[in] | size | Size (in chars) of the buffer. |
[out] | size_ret | Required size (in chars) to store result. |
CLDNN_API void cldnn_set_network_input | ( | cldnn_network | network, |
cldnn_primitive_id | id, | ||
cldnn_memory | mem, | ||
cldnn_status * | status | ||
) |
Provides user input data to the network (for input_layout
primitives).
[in] | id | Primitive id of input_layout primitive defined in topology . |
[in] | mem | Memory object with user data which layout matches the input_layout defined in topology . |
User should set the input data for every input_layout
primitive defined in topology
by calling this function before call to cldnn_execute_network().