Skip to main content

ruda_tensor/api/
mod.rs

1pub(crate) mod stats;
2
3pub(crate) mod check;
4
5mod autodiff;
6mod base;
7mod bool;
8mod cartesian_grid;
9#[path = "cast.rs"]
10mod tensor_cast;
11mod float;
12mod fmod;
13mod int;
14mod numeric;
15mod options;
16mod orderable;
17mod pad;
18pub use pad::IntoPadding;
19mod take;
20mod transaction;
21pub mod sparse;
22
23mod trunc;
24
25pub use autodiff::*;
26pub use base::*;
27pub use cartesian_grid::cartesian_grid;
28pub use tensor_cast::*;
29pub use crate::element::cast;
30pub use float::{DEFAULT_ATOL, DEFAULT_RTOL};
31pub use numeric::*;
32pub use options::*;
33pub use transaction::*;
34
35pub use crate::tensor::IndexingUpdateOp;
36pub use crate::collective::{TensorCollective,ReplicatedTensorCollective,BroadcastTensorCollective};
37
38// Re-exported types
39pub use crate::{
40    BoolDType, BoolStore, DType, DataError, FloatDType, IntDType, TensorData, TensorMetadata,
41    TensorPrimitive, Tolerance,
42    distribution::*,
43    element::*,
44    indexing::*,
45    ops::TransactionPrimitive,
46    shape::*,
47    slice::*,
48    tensor::{Bool, Float, Int, TensorKind},
49};
50
51/// The activation module.
52pub mod activation;
53
54/// The backend module.
55pub mod backend {
56    pub use crate::backend::*;
57}
58
59/// The container module.
60pub mod container {
61    pub use crate::tensor::TensorContainer;
62}
63
64/// The grid module.
65pub mod grid;
66
67/// The linalg module.
68pub mod linalg;
69
70/// The loss module.
71pub mod loss;
72
73/// The neural network module.
74pub mod module;
75
76/// The signal processing module.
77pub mod signal;
78
79/// Operations on tensors module.
80pub mod ops {
81    pub use crate::backend::ops::*;
82    pub use crate::tensor::{
83        BoolElem, BoolTensor, Device, FloatElem, FloatTensor, IntElem, IntTensor, QuantizedTensor,
84    };
85}
86
87/// Tensor quantization module.
88pub mod quantization;
89
90#[cfg(feature = "api-std")]
91pub use report::*;
92
93#[cfg(feature = "api-std")]
94mod report;
95
96pub use ops::Device; // Re-export device so that it's available from `ruda_tensor::api::Device`.
97
98pub(crate) use check::macros::check;
99
100pub use crate::{
101    AllocationProperty, Bytes, DeviceSettings, StreamId, bf16, f16, get_device_settings, read_sync,
102    set_default_dtypes, try_read_sync,
103};