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 grouped_nf4;
31pub mod packed_experts;
33pub mod expert_projection;
35pub mod moe;
37pub mod moe_exchange;
39#[cfg(feature = "distributed")]
40pub mod distributed;
41
42pub mod backend;
44pub use backend::*;
45
46pub mod tensor;
48
49#[cfg(feature = "graph")]
51pub mod graph;
52
53pub use ruda_core::reader::*; pub use ruda_core::bytes::{AllocationProperty, Bytes};
56pub use ruda_core::device_handle::DeviceHandle;
57pub use ruda_core::stream_id::StreamId;
58pub use ruda_core::tensor::{BoolDType, BoolStore, DType, FloatDType, IntDType};
59pub use half::{bf16, f16};
60
61pub mod shape {
63 pub use ruda_core::tensor::shape::*;
64}
65pub use shape::*;
66
67pub mod slice {
69 pub use ruda_core::tensor::{s, slice::*};
70}
71pub use slice::*;
72
73pub mod indexing {
75 pub use ruda_core::tensor::indexing::*;
76}
77pub use indexing::*;
78
79pub mod quantization {
81 pub use crate::tensor::quantization::*;
82 pub use ruda_core::tensor::quantization::{
83 BlockSize, QuantLevel, QuantMode, QuantParam, QuantPropagation, QuantScheme, QuantStore,
84 QuantValue, QuantizedBytes,
85 };
86}
87
88#[macro_export]
97macro_rules! doc_tensor {
98 () => {
99 "[`Tensor`](crate::api::Tensor)"
100 };
101
102 ($method:literal) => {
103 concat!(
104 "[`Tensor::",
105 $method,
106 "`](crate::api::Tensor::",
107 $method,
108 ")"
109 )
110 };
111}
112
113#[cfg(feature = "api")]
115pub mod api;