Skip to main content

Crate tenferro_ops

Crate tenferro_ops 

Source
Expand description

Internal tensor operation vocabulary shared by tenferro graph crates.

This crate owns symbolic dimension expressions, extension-op traits, shape guards, and the standard tensor op enum used by traced execution and AD lowering. End users normally interact through tenferro-runtime and operation-family crates rather than importing this crate directly.

§Examples

use tenferro_ops::{ShapeExtent, SymDim};
use tenferro_ops::std_tensor_op::StdTensorOp;

let op = StdTensorOp::constant(2.0_f64);
let extent = ShapeExtent::exact(SymDim::from(3usize));
assert!(matches!(op, StdTensorOp::Constant { .. }));
assert!(extent.is_exact());

Collected shape constraints are inference-driver internals rather than a crate-root extension-author API:

use tenferro_ops::ExtensionShapeConstraint;

Re-exports§

pub use ad::context::ShapeGuard;
pub use ad::context::ShapeGuardContext;
pub use ad::context::ShapeGuardError;
pub use ad::context::ShapeGuardFailure;
pub use ad::context::ShapeGuardResult;
pub use ad::context::TensorMeta;
pub use ext_op::ExtensionOp;
pub use shape_extent::ShapeExtent;
pub use sym_dim::SymDim;
pub use sym_dim::SymDimConversionError;

Modules§

ad
Automatic differentiation rules for StdTensorOp.
axis
broadcast
config
dim_expr
ext_op
Out-of-tree extension-operation mechanism.
input_key
reduction
shape_extent
Shape extent metadata with exactness guarantees.
std_tensor_op
sym_dim

Structs§

ExtensionShapeContext
Input metadata and equality requirements for one extension inference call.

Enums§

ExtensionShapeError
Errors produced while extension shape requirements inspect input metadata.
ShapeRelation
A relation between two symbolic shape expressions.

Derive Macros§

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