Skip to main content

Module extension

Module extension 

Source
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§

CompilerOptions
ExtensionEffect
Backend-neutral resource access declared by an extension payload.
ExtensionExecutionContext
Backend and cache state passed to one prepared extension execution.
ExtensionShapeContext
Input metadata and equality requirements for one extension inference call.
SymDim
A symbolic tensor dimension expression used to build shape-agnostic graphs.

Enums§

ExtensionAlias
One extension-declared output alias.
ExtensionAliasDeclaration
Explicit alias declaration returned by an extension payload.
ExtensionEffectAccess
Access mode for one extension-declared semantic resource.
ExtensionEffectDeclaration
Explicit effect declaration returned by an extension payload.

Traits§

ExtensionOp
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§

ExtensionFamilyId
Derive an inherent FAMILY_ID constant for an extension payload type.