Struct anira_edge_info#
-
struct anira_edge_info#
One directed edge of the edge registry, from one end to the other, each end a domain or a backend: whether the edge can be used here (available), where it takes a tensor’s bytes (edge_class) and who moves them (moved_by), the memory kind of the backend’s device (memory_kind), how sure the probe is (rung), and why (reason). An end is a backend when its engine is set (from_engine, to_engine: an engine on a provider, under the pair rule of anira_backend_id: ANIRA_ENGINE_CUSTOM beside an engine id, ANIRA_PROVIDER_CUSTOM beside a provider id), else its domain (from_domain, to_domain). In this pre-release every row has a Host end and a backend end: two rows per backend, from ANIRA_DOMAIN_HOST to the backend (the way an input goes) and from the backend to ANIRA_DOMAIN_HOST (the way an output goes), with the same class, mover and memory kind and each its direction’s reason (an input’s upload, an output’s readback). A row is the provider’s edge, by the provider rule for its direction, before any model exists: the best a plan on that backend can do. What a plan’s engine does with each tensor (an engine that copies its outputs, say) is that plan’s anira_plan_slot rows. Tier 2, struct_size first; looked up by its two ends (anira_capabilities_edge) and enumerated at the caller’s stride (anira_capabilities_edges).
Public Members
-
uint32_t struct_size#
sizeof(anira_edge_info) of the caller’s header.
-
uint32_t from_domain#
anira_domain of the from end when from_engine is ANIRA_ENGINE_NONE; ANIRA_DOMAIN_HOST, and not read, on a backend end.
-
uint32_t from_engine#
anira_engine of a backend from end (ANIRA_ENGINE_CUSTOM beside from_engine_id); ANIRA_ENGINE_NONE on a domain end.
-
uint32_t from_provider#
anira_provider of a backend from end (ANIRA_PROVIDER_CUSTOM beside from_provider_id); ANIRA_PROVIDER_NONE on a domain end.
-
uint32_t to_domain#
As from_domain, for the to end.
-
uint32_t to_engine#
As from_engine, for the to end (ANIRA_ENGINE_CUSTOM beside to_engine_id).
-
uint32_t to_provider#
As from_provider, for the to end (ANIRA_PROVIDER_CUSTOM beside to_provider_id).
-
uint32_t available#
1 when the edge can be used here, else 0.
-
uint32_t edge_class#
anira_edge_class: where the edge takes the tensor’s bytes; on a row with available 0, the edge the row would provide.
-
uint32_t moved_by#
anira_mover_flags bits: who executes the edge’s moves: ANIRA_MOVER_NONE on a zero-copy edge, ANIRA_MOVER_ENGINE where the engine’s runtime moves host memory to its device and back itself.
-
uint32_t memory_kind#
anira_memory_kind: the physical memory the backend’s provider computes in, the fact a device provider’s class follows: ANIRA_MEMORY_UNIFIED for a provider that runs over host memory (nothing probed) and for a device of unified memory (ANIRA_EDGE_UNIFIED_TRANSFER), ANIRA_MEMORY_DEDICATED for a device of its own memory (ANIRA_EDGE_DEDICATED_TRANSFER), ANIRA_MEMORY_UNKNOWN where no probe established it (ANIRA_EDGE_UNKNOWN). A device provider’s kind is asked of its device’s API the first time a row of its backend is read, for both rows of the backend, and kept by the context.
-
uint32_t rung#
anira_probe_rung: how the row was established.
-
const char *reason#
Why the edge is unavailable, or why it is available and of its class (a device provider’s names its memory kind and what the probe saw); valid while the context is, NULL when there is nothing to say.
-
const char *from_engine_id#
The id of a custom engine of the pipeline on a backend from end (from_engine ANIRA_ENGINE_CUSTOM; anira_pipeline_capabilities_edge), the engine’s own string, valid while the pipeline holds the engine; NULL for a built-in engine and on a domain end.
-
const char *from_provider_id#
The name of a custom provider on a backend from end (from_provider ANIRA_PROVIDER_CUSTOM), in the engine’s own vocabulary (anira_provider), valid while the capabilities are; NULL for a provider the enum names and on a domain end.
-
const char *to_engine_id#
As from_engine_id, for the to end.
-
const char *to_provider_id#
As from_provider_id, for the to end.
-
uint32_t struct_size#