Struct anira_ext_provider_options#

struct anira_ext_provider_options#

Inheritance diagram for anira_ext_provider_options:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="anira::detail::ProviderOptionsNative" tooltip="anira::detail::ProviderOptionsNative"]
    "1" [label="anira_ext_provider_options" tooltip="anira_ext_provider_options" fillcolor="#BFBFBF"]
    "2" -> "1" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for anira_ext_provider_options:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="anira_ext_header" tooltip="anira_ext_header"]
    "1" [label="anira_ext_provider_options" tooltip="anira_ext_provider_options" fillcolor="#BFBFBF"]
    "3" [label="anira_provider_option_set" tooltip="anira_provider_option_set"]
    "1" -> "2" [dir=forward tooltip="usage"]
    "1" -> "3" [dir=forward tooltip="usage"]
}

Extension “provider_options”, version 1, on the context config: the options an engine’s runtime takes for a provider, one set per backend (anira_provider_option_set). Each set is checked against the backend it names. Its engine must consume the kind: the ONNX Runtime adapter, which reads the set of the plan’s backend at load into the execution provider’s options (CUDA’s own entry and the generic one alike), or a custom engine whose descriptor lists “context:provider_options”, which receives the set in its load record; a set for another engine is ANIRA_ERROR_EXTENSION_UNCONSUMED naming the backend, at anira_context_create for a built-in engine (no adapter of the build reads the kind for it) and at anira_handler_create for a custom engine of the pipeline. Its provider must be one the engine serves here, the context’s capabilities for a built-in engine and the descriptor’s list for a custom one, else ANIRA_ERROR_NOT_SUPPORTED at anira_handler_create, so a misspelled provider word is refused and never silently ignored. A set for a custom engine no pipeline of the handler adds, or for a backend no plan runs on, is not an error. The options are part of the loaded model where its engine reads them: two contexts with different options for one backend load twice. A device block of the context (anira_cuda_desc.device and its siblings) and a provider option that selects a device (“device_id” for CUDA) name the same device: anira does not reconcile the two in this pre-release. JSON: {“version”: 1, “sets”: [{“engine”: “onnxruntime”, “provider”: “cuda”, “options”: {“device_id”: “0”}}]}: the pair as its two keys, as a model entry spells them (a built-in engine’s word or a custom engine’s id; the enum’s spelling or a custom provider’s name, never “cpu”, the CPU path, which takes no options), every option value a string.

Subclassed by anira::detail::ProviderOptionsNative

Public Members

anira_ext_header header#

{sizeof(anira_ext_provider_options), 1, “provider_options”}.

const anira_provider_option_set *sets#

num_sets records at the stride of the first record’s struct_size (an array has one), each read within it; copied. NULL with a count of 0 for none.

uint32_t num_sets#

The number of sets.

uint32_t reserved#

0.