Enum anira_provider#
-
enum anira_provider#
Execution provider, the other backend axis; a provider name means the same thing across engines. Values after ANIRA_PROVIDER_XNNPACK and below ANIRA_PROVIDER_CUSTOM are reserved for later providers, which are appended after XNNPACK and never renumber CUSTOM. The pair rule, wherever a provider is named (the pin of a model entry, the default provider, anira_backend_id, anira_plan_info, anira_edge_info, anira_provider_option_set, anira_engine_load_info, anira_processor_ctx): the provider_id is non-NULL if and only if the provider is ANIRA_PROVIDER_CUSTOM. A provider of the enum is its value with a NULL id; a provider the enum does not name is ANIRA_PROVIDER_CUSTOM with its non-empty name in the engine’s own vocabulary: the runtime’s name for a built-in engine (what the context’s capabilities report), an entry of the descriptor’s providers list for a custom engine. A setter refuses any other combination, ANIRA_PROVIDER_NONE beside a name included, with ANIRA_ERROR_INVALID_ARGUMENT. ANIRA_PROVIDER_NONE names no provider and takes no id: it unpins a model entry and clears the default provider, and is refused wherever a provider must be real (a candidate, a provider option set) with ANIRA_ERROR_INVALID_ARGUMENT, as ANIRA_ENGINE_NONE is refused as an entry’s engine. ANIRA_PROVIDER_CPU is the engine’s plain CPU path. A provider is part of the loaded model: two providers of one model load twice (anira/abi/engine.h).
Values:
-
enumerator ANIRA_PROVIDER_NONE#
No provider, nothing chosen: the zero value, what an _INIT record and a zeroed record hold. A neutral model entry (JSON: no “provider” key) and a model config without a default provider (JSON: no “default_provider” key); refused as the provider of a candidate and of a provider option set.
-
enumerator ANIRA_PROVIDER_CPU#
The engine’s plain CPU path, no delegate or execution provider (JSON “cpu”): ONNX Runtime’s CPUExecutionProvider, LibTorch, ExecuTorch without a delegate, TFLite, LiteRT’s “cpu” accelerator. Every built-in engine serves it (its first capability row). XNNPACK is a provider of its own, a delegate that also computes on the CPU.
-
enumerator ANIRA_PROVIDER_CUDA#
CUDA (JSON “cuda”, the value of a model entry’s “provider” key).
-
enumerator ANIRA_PROVIDER_WEBGPU#
WebGPU (JSON “webgpu”).
-
enumerator ANIRA_PROVIDER_VULKAN#
Vulkan (JSON “vulkan”).
-
enumerator ANIRA_PROVIDER_DIRECTML#
DirectML (JSON “directml”).
-
enumerator ANIRA_PROVIDER_COREML#
Core ML (JSON “coreml”).
-
enumerator ANIRA_PROVIDER_XNNPACK#
XNNPACK (JSON “xnnpack”).
-
enumerator ANIRA_PROVIDER_CUSTOM#
A provider the enum does not name, named by the provider_id beside it in the engine’s own vocabulary (JSON: the name itself, “com.example.npu”).
-
enumerator ANIRA_PROVIDER_FORCE32#
-
enumerator ANIRA_PROVIDER_NONE#