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 satisfyClone + Hash + Eq + Send + Sync + 'static(computegraph’sGraphOperationrequirements). - AD rules are owned by explicit
ExtensionRuleSetvalues. A rule may emit coreStdTensorOpvalues and registeredExtensionvalues so out-of-tree operations remain in the same graph. - Extension ops themselves do not require process-global registration.
Frontends carry them directly as
Arc<dyn ExtensionOp>.
Structs§
- Extension
Lowering Error - Error returned when an extension cannot expand itself into standard ops.
- Extension
Rule Set - Explicit, owned set of extension AD rules.
Enums§
- Extension
Registry Error - Errors returned from extension registries.
Traits§
- Extension
AdRule - AD rule provider for an extension family.
- Extension
Op - The contract every out-of-tree extension primitive must satisfy.
Functions§
- linearize_
extension_ rule - Emit a registered extension linearization rule.
- transpose_
extension_ rule - Emit a registered extension transpose rule.
Type Aliases§
- Extension
Lowering Result - Result returned by
ExtensionOp::lower_to_standard_ops.