1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # Bunsen Prelude
//!
//! The traits and types most code that uses bunsen needs in scope, for one
//! glob import:
//!
//! ```
//! use bunsen::prelude::*;
//! ```
//!
//! Glob it in code that builds bunsen modules from configs, calls the tensor
//! extension methods, or checks shape contracts. Most of what it re-exports is
//! traits, which have to be in scope for their methods to resolve. It
//! re-exports:
//!
//! - [`ModuleInit`] and [`ToStructureConfig`], so `config.init(&device)` and
//! `policy.to_structure()` resolve on bunsen configs;
//! - everything in [`crate::burner::tensor`]: the `Tensor` and `TensorData`
//! extension traits (`TensorOpExt`, `TensorElemOpExt`, `TensorOrderedOpExt`,
//! `TensorIntOpExt`, `TensorBoolOpExt`, `TensorDataViewExt`,
//! `TensorDataToVecAsExt`, `TensorDataCheckExt`), the `TensorDataView` and
//! `TensorDataViewMut` views, `backend_float_dtype`, and the `dynamic`
//! submodule;
//! - everything in [`crate::contracts`]: `ShapeContract` and the shape contract
//! macros, such as `shape_contract!` and `assert_shape_contract!`;
//! - from [`crate::errors`]: `BunsenError`, `BunsenErrorKind`, `BunsenResult`,
//! and the `ResultContext` and `WithOkOrPanic` traits. The cause types
//! (`ConstraintError`, `LookupError`, ...) stay in `errors`.
//!
//! It re-exports no `Module` types, configs, or backends; import those from
//! where they live. No name in it is also in `burn::prelude`, so the two globs
//! can sit side by side.
pub use crate;
pub use crate*;
pub use crate*;
pub use crate;