Expand description
Runtime EpContext form and the source-keyed EpContextRegistry
(docs/ORT2.md §55.1 / §55.6).
§Two forms of one thing
An ORT com.microsoft::EPContext node is the on-disk / interchange form
of a compiled-EP context (§55.1). The loader (onnx-runtime-loader) owns the
typed view over that node (EpContextNode) and resolves its blob
(EpContextBlob). This module owns the runtime form: the in-memory
EpContext an EP produces via ExecutionProvider::save_context and
consumes via ExecutionProvider::load_context, plus the registry that maps
a node’s source attribute → the EpId that owns it.
§Model-agnostic dispatch (hard rule, §55.6)
EP selection for an EPContext node is always by the node’s source
attribute, resolved through EpContextRegistry — never by a hardcoded
EP/vendor name. Each EP declares the source key(s) it accepts (from its own
config/data, not code) via ExecutionProvider::context_source_keys; the
registry maps key → EP. Adding a new compiled EP requires no change to
loader/session dispatch code.
Structs§
- EpContext
- The runtime form of a compiled-EP context (
docs/ORT2.md§4 / §55.1). - EpContext
Registry - Registry mapping an
EPContextnode’ssourcekey → theEpIdthat owns it (docs/ORT2.md§55.6).
Functions§
- build_
ep_ context_ registry - Build an
EpContextRegistryfrom a set of registered EPs (§55.6).