Expand description
Device neutral tensor handles, dtypes, arenas, the Backend trait and the plan executor. A plan is a flat precomputed list of ops for one model at one shape bucket, and the hot path through it does no allocation, no locking and no dynamic dispatch per op. See spec/07-engine.md.
One of the six crates where unsafe is allowed. Every block carries a // SAFETY: comment
that names the invariant which makes it sound.
Re-exports§
pub use backend::Backend;pub use backend::Batch;pub use backend::BatchBuf;pub use backend::Caps;pub use backend::Error;pub use backend::Executor;pub use backend::HostTensor;pub use backend::Outputs;pub use backend::Result;pub use blob::Blob;pub use bucket::Bucket;pub use bucket::Buckets;pub use dtype::DType;pub use plan::Epilogue;pub use plan::Graph;pub use plan::Layout;pub use plan::Op;pub use plan::Rows;pub use plan::Shape;pub use plan::Val;pub use plan::W;pub use plan::layout;
Modules§
- backend
- The
Backendtrait and the executor that picks a bucket and replays its plan. - blob
- Read only bytes that are either a mapped file or owned memory.
- bucket
- The bucket table: which padded shapes plans are built for.
- dtype
- Element types as they appear in checkpoints.
- plan
- The op graph a model builder emits and a backend lowers, see spec/07-engine.md.