Struct anira_provider_option_set#

struct anira_provider_option_set#

One set of anira_ext_provider_options: a backend (an engine on a provider, the two-axis id as anira_backend_id spells it) and the options its runtime takes for the provider, as string pairs in the runtime’s own vocabulary (ONNX Runtime’s execution provider option keys: device_id for CUDA, backend_path for QNN, …), kept in key order (two sets with the same pairs are one set, whatever their order). Tier 2, struct_size first, read within it; copied by the set call, which refuses a malformed set with ANIRA_ERROR_INVALID_ARGUMENT naming it: a struct_size below the fixed head or unlike the first record’s (an array has one stride), an engine or a provider value this header does not name, a pair against the pair rule of anira_engine and anira_provider (an id beside a value other than CUSTOM, CUSTOM without an id, an empty id), no provider (ANIRA_PROVIDER_NONE) or the CPU path (ANIRA_PROVIDER_CPU, which takes no options), or a count of options without both arrays or with a NULL entry. Nothing is dropped or ignored on the quiet.

Public Members

uint32_t struct_size#

sizeof(anira_provider_option_set) of the caller’s header.

uint32_t engine#

anira_engine of the backend; ANIRA_ENGINE_CUSTOM with an engine_id for a custom engine, which receives the set in its load record (anira_engine_load_info.option_keys) when its descriptor lists “context:provider_options”.

uint32_t provider#

anira_provider of the backend; ANIRA_PROVIDER_CUSTOM with a provider_id for a custom one; never ANIRA_PROVIDER_NONE, which names no provider, nor ANIRA_PROVIDER_CPU, the CPU path, which takes no options: a set for either is refused.

uint32_t num_options#

The number of key/value pairs.

const char *engine_id#

The id of a custom engine (engine ANIRA_ENGINE_CUSTOM), copied; NULL for a built-in engine.

const char *provider_id#

A custom provider’s name in the engine’s vocabulary (provider ANIRA_PROVIDER_CUSTOM), copied; NULL for a provider the enum names.

const char *const *keys#

num_options option names, NUL-terminated, copied.

const char *const *values#

num_options option values, NUL-terminated, copied.