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 tenferro_ops::ext_op::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::extension_runtime::ExtensionExecutionContext;
pub use crate::extension_runtime::ExtensionExecutor;
pub use crate::extension_runtime::ExtensionRegistry;
pub use crate::extension_runtime::ExtensionRuntime;
pub use crate::extension_runtime::ExtensionRuntimeRegistryError;

Structs§

CompilerOptions

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.