Skip to main content

Module ext_op

Module ext_op 

Source
Expand description

Out-of-tree extension-operation mechanism.

This module implements the ExtensionOp trait and its process-local registry. Together they let external crates contribute fused primitives that participate in the crate::std_tensor_op::StdTensorOp graph through the single carrier variant StdTensorOp::Extension(Arc<dyn ExtensionOp>).

See docs/spec/extension-op.md for the normative contract. Key points:

  • Identity / hashing / equality are expressed on the trait so the type-erased Arc<dyn ExtensionOp> carrier can satisfy Clone + Hash + Eq + Send + Sync + 'static (computegraph’s GraphOperation requirements).
  • AD rules are owned by the semantic AD registry in tenferro-ad; this extension-operation contract does not import an AD engine.
  • Extension ops themselves do not require process-global registration. Frontends carry them directly as Arc<dyn ExtensionOp>.

Structs§

ExtensionEffect
Backend-neutral resource access declared by an extension payload.

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.
ExtensionLoweringError
Error returned when an extension cannot expand itself into standard ops.
ExtensionStandardLowering
Typed result of trying to lower an extension into standard tensor ops.

Traits§

ExtensionOp
The contract every out-of-tree extension primitive must satisfy.

Type Aliases§

ExtensionLoweringResult
Result returned by ExtensionOp::lower_to_standard_ops.