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;
25pub mod frozen_awq;
27pub mod frozen_nf4;
29pub mod moe;
31pub mod moe_exchange;
33#[cfg(feature = "distributed")]
34pub mod distributed;
35
36pub mod backend;
38pub use backend::*;
39
40pub mod tensor;
42
43#[cfg(feature = "graph")]
45pub mod graph;
46
47pub use ruda_core::reader::*; pub use ruda_core::bytes::{AllocationProperty, Bytes};
50pub use ruda_core::device_handle::DeviceHandle;
51pub use ruda_core::stream_id::StreamId;
52pub use ruda_core::tensor::{BoolDType, BoolStore, DType, FloatDType, IntDType};
53pub use half::{bf16, f16};
54
55pub mod shape {
57 pub use ruda_core::tensor::shape::*;
58}
59pub use shape::*;
60
61pub mod slice {
63 pub use ruda_core::tensor::{s, slice::*};
64}
65pub use slice::*;
66
67pub mod indexing {
69 pub use ruda_core::tensor::indexing::*;
70}
71pub use indexing::*;
72
73pub mod quantization {
75 pub use crate::tensor::quantization::*;
76 pub use ruda_core::tensor::quantization::{
77 BlockSize, QuantLevel, QuantMode, QuantParam, QuantPropagation, QuantScheme, QuantStore,
78 QuantValue, QuantizedBytes,
79 };
80}
81
82#[macro_export]
91macro_rules! doc_tensor {
92 () => {
93 "[`Tensor`](crate::api::Tensor)"
94 };
95
96 ($method:literal) => {
97 concat!(
98 "[`Tensor::",
99 $method,
100 "`](crate::api::Tensor::",
101 $method,
102 ")"
103 )
104 };
105}
106
107#[cfg(feature = "api")]
109pub mod api;