Expand description
Public surface for out-of-tree extension primitives.
This module exposes the Stage 6 ExtensionOp mechanism through the
runtime crate. External crates implement
ExtensionOp and build traced graphs containing the extension via
apply.
See docs/spec/extension-op.md for the normative contract.
§Examples
use tenferro_runtime::extension::{apply, ExtensionOp};
// Construct an `Arc<dyn ExtensionOp>` and call `apply(op, &[input])`
// to lower it into a `TracedTensor`.Re-exports§
pub use crate::extension_cache::ExtensionCacheKey;pub use crate::extension_cache::ExtensionCacheLimits;pub use crate::extension_cache::ExtensionCacheSelector;pub use crate::extension_cache::ExtensionCacheStore;pub use crate::runtime::ExtensionModule;pub use crate::runtime::ExtensionModuleId;pub use crate::runtime::ExtensionModuleRegistrar;
Macros§
- define_
extension_ runtime - Generate a standard extension module, preparation engine, and prepared operation.
Structs§
- Compiler
Options - Extension
Effect - Backend-neutral resource access declared by an extension payload.
- Extension
Execution Context - Backend and cache state passed to one prepared extension execution.
- Extension
Shape Context - Input metadata and equality requirements for one extension inference call.
- SymDim
- A symbolic tensor dimension expression used to build shape-agnostic graphs.
Enums§
- Extension
Alias - One extension-declared output alias.
- Extension
Alias Declaration - Explicit alias declaration returned by an extension payload.
- Extension
Effect Access - Access mode for one extension-declared semantic resource.
- Extension
Effect Declaration - Explicit effect declaration returned by an extension payload.
Traits§
- Extension
Op - The contract every out-of-tree extension primitive must satisfy.
Functions§
- apply
- Apply an extension op in the traced graph.
- apply_
expanded_ graph - Apply an extension-provided lowering as ordinary traced graph operations.
Derive Macros§
- Extension
Family Id - Derive an inherent
FAMILY_IDconstant for an extension payload type.