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());

Re-exports§

pub use ad::context::ShapeGuard;
pub use ad::context::ShapeGuardContext;
pub use ad::context::TensorMeta;
pub use ext_op::linearize_extension_rule;
pub use ext_op::transpose_extension_rule;
pub use ext_op::ExtensionAdRule;
pub use ext_op::ExtensionOp;
pub use ext_op::ExtensionRegistryError;
pub use ext_op::ExtensionRuleSet;
pub use shape_extent::ShapeExtent;
pub use sym_dim::SymDim;

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

Derive Macros§

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