1#![cfg_attr(not(feature = "std"), no_std)]
2#![warn(missing_docs)]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4
5#[macro_use]
8extern crate derive_new;
9
10extern crate alloc;
11
12use ruda_core::tensor::data;
13pub use data::*;
14
15pub use ruda_core::tensor::distribution;
16pub use distribution::*;
17pub use ruda_core::tensor::element;
18pub use ruda_core::make_element;
19pub use element::*;
20
21pub mod device;
22pub mod primitive;
23pub mod ops;
24pub mod collective;
25#[cfg(feature = "distributed")]
26pub mod distributed;
27
28pub mod backend;
30pub use backend::*;
31
32pub mod tensor;
34
35#[cfg(feature = "graph")]
37pub mod graph;
38
39pub use ruda_core::reader::*; pub use ruda_core::bytes::{AllocationProperty, Bytes};
42pub use ruda_core::device_handle::DeviceHandle;
43pub use ruda_core::stream_id::StreamId;
44pub use ruda_core::tensor::{BoolDType, BoolStore, DType, FloatDType, IntDType};
45pub use half::{bf16, f16};
46
47pub mod shape {
49 pub use ruda_core::tensor::shape::*;
50}
51pub use shape::*;
52
53pub mod slice {
55 pub use ruda_core::tensor::{s, slice::*};
56}
57pub use slice::*;
58
59pub mod indexing {
61 pub use ruda_core::tensor::indexing::*;
62}
63pub use indexing::*;
64
65pub mod quantization {
67 pub use crate::tensor::quantization::*;
68 pub use ruda_core::tensor::quantization::{
69 BlockSize, QuantLevel, QuantMode, QuantParam, QuantPropagation, QuantScheme, QuantStore,
70 QuantValue, QuantizedBytes,
71 };
72}
73
74#[macro_export]
83macro_rules! doc_tensor {
84 () => {
85 "[`Tensor`](crate::api::Tensor)"
86 };
87
88 ($method:literal) => {
89 concat!(
90 "[`Tensor::",
91 $method,
92 "`](crate::api::Tensor::",
93 $method,
94 ")"
95 )
96 };
97}
98
99#[cfg(feature = "api")]
101pub mod api;