Skip to main content

Module types

Module types 

Source
Expand description

Hierarchical type system resolved at compile time by the compiler’s TypeSolver. The tree is open via inventory: backends and DSL authors register new leaves via inventory::submit!. The Lattice is built once at startup; is_subtype_of walks the parent chain with caching. The runtime never sees abstract types.

Re-exports§

pub use common_relations::BROADCAST_BINARY;
pub use common_relations::ELEMENTWISE;
pub use common_relations::MATMUL_BINARY;
pub use common_relations::NO_RELATIONS;
pub use common_relations::REDUCE_AXIS;
pub use common_relations::UNARY_SAME_ELEMENT;
pub use lattice::Lattice;
pub use relations::CustomRelationCtx;
pub use relations::PortRef;
pub use relations::RelationResult;
pub use relations::TypeRelation;
pub use storage::AnyTensor;
pub use storage::Dtype;
pub use storage::Storage;
pub use builtins::*;

Modules§

builtins
Built-in TypeNode constants the framework + DSL ship out of the box.
common_relations
Named TypeRelation slice constants for the common op shapes.
lattice
Global lattice of registered TypeNodes.
relations
Type relations on ops.
storage
Storage — static link between a Rust storage type and its IR TypeNode. Library makers declare where in the polymorphism tree their concrete sits by picking the Storage impl for their associated type.

Structs§

TypeNode
Static type-identity carrier. Identity is pointer equality; subtype queries route through Lattice.
TypeNodeReg
Inventory submission carrier for TypeNodes.

Enums§

TypeKind
Concrete dispatchable leaf vs. abstract interior bound.

Functions§

lookup_by_id
Resolve a TypeNode by its id string. None if no submission has registered that id at startup.