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;
24#[cfg(feature = "distributed")]
25pub mod distributed;
26
27pub mod backend;
29pub use backend::*;
30
31pub mod tensor;
33
34#[cfg(feature = "graph")]
36pub mod graph;
37
38pub use ruda_core::reader::*; pub use ruda_core::bytes::{AllocationProperty, Bytes};
41pub use ruda_core::device_handle::DeviceHandle;
42pub use ruda_core::stream_id::StreamId;
43pub use ruda_core::tensor::{BoolDType, BoolStore, DType, FloatDType, IntDType};
44pub use half::{bf16, f16};
45
46pub mod shape {
48 pub use ruda_core::tensor::shape::*;
49}
50pub use shape::*;
51
52pub mod slice {
54 pub use ruda_core::tensor::{s, slice::*};
55}
56pub use slice::*;
57
58pub mod indexing {
60 pub use ruda_core::tensor::indexing::*;
61}
62pub use indexing::*;
63
64pub mod quantization {
66 pub use crate::tensor::quantization::*;
67 pub use ruda_core::tensor::quantization::{
68 BlockSize, QuantLevel, QuantMode, QuantParam, QuantPropagation, QuantScheme, QuantStore,
69 QuantValue, QuantizedBytes,
70 };
71}
72
73#[macro_export]
82macro_rules! doc_tensor {
83 () => {
84 "[`Tensor`](crate::api::Tensor)"
85 };
86
87 ($method:literal) => {
88 concat!(
89 "[`Tensor::",
90 $method,
91 "`](crate::api::Tensor::",
92 $method,
93 ")"
94 )
95 };
96}
97
98#[cfg(feature = "api")]
100pub mod api;