Skip to main content

ruda_core/
lib.rs

1#![no_std]
2#![warn(missing_docs)]
3
4//! # `Ruda` Common Library
5//!
6//! This library contains common types used by other crates that must be shared.
7
8#[cfg(any(feature = "std", feature = "ir-std"))]
9extern crate std;
10
11#[macro_use]
12extern crate derive_new;
13
14/// Rand module contains types for random number generation for non-std environments and for
15/// std environments.
16pub mod rand;
17
18/// Random identifiers sharing the common RNG.
19#[cfg(feature = "id")]
20pub mod id;
21
22/// A circular, allocation-free arena for reusable memory blocks.
23#[cfg(feature = "std")]
24pub mod arena;
25
26/// Backtrace module to build error reports.
27pub mod backtrace;
28
29/// Device module.
30pub mod device;
31
32/// Device handle module.
33pub mod device_handle {
34    pub use super::device::handle::DeviceHandle;
35}
36
37/// Utilities module to manipulate bytes.
38#[cfg(feature = "serde")]
39pub mod bytes;
40
41/// Stub module contains types for stubs for non-std environments and for std environments.
42pub mod stub;
43
44/// Stream id related utilities.
45pub mod stream_id;
46
47/// Cache module for an efficient in-memory and persistent database.
48#[cfg(feature = "cache")]
49pub mod cache;
50
51#[cfg(feature = "cache")]
52pub(crate) mod cache_file;
53
54/// Chunked cache optimized for compilation artifacts
55#[cfg(feature = "compilation-cache")]
56pub mod compilation_cache;
57
58/// Module for benchmark timings
59pub mod benchmark;
60
61/// Runtime configuration trait shared across crates.
62pub mod config;
63
64/// Module for profiling any executable part
65pub mod profile;
66
67/// Useful when you need to read async data without having to decorate each function with async
68/// notation.
69pub mod reader;
70
71/// Future utils with a compatible API for native, non-std and wasm environments.
72pub mod future;
73
74/// Quantization primitives required outside of `ruda-kernel`
75pub mod quant;
76
77/// Format utilities.
78pub mod format;
79
80/// Various utilities to create ID's.
81extern crate alloc;
82
83/// Hashing helper for stable, collision resistant hashes
84#[cfg(feature = "hash")]
85pub mod hash;
86
87/// Custom float implementations
88pub mod numeric;
89
90pub use numeric::*;
91
92extern crate self as ruda_core;
93
94#[cfg(feature = "ir")]
95pub mod ir;
96
97#[cfg(feature = "tensor")]
98pub mod tensor;
99
100#[cfg(feature = "compiler")]
101pub mod compiler;
102
103#[cfg(feature = "compiler")]
104pub mod kernel;
105
106#[cfg(feature = "compiler")]
107pub mod launch;
108
109#[cfg(feature = "argument-layout")]
110pub mod arguments;