cubecl_common/lib.rs
1#![no_std]
2#![warn(missing_docs)]
3
4//! # `CubeCL` Common Library
5//!
6//! This library contains common types used by other crates that must be shared.
7
8#[cfg(feature = "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/// Backtrace module to build error reports.
19pub mod backtrace;
20
21/// Device module.
22pub mod device;
23
24/// Map utilities and implementations.
25pub mod map;
26
27/// Utilities module to manipulate bytes.
28#[cfg(feature = "serde")]
29pub mod bytes;
30
31/// Stub module contains types for stubs for non-std environments and for std environments.
32pub mod stub;
33
34/// Stream id related utilities.
35pub mod stream_id;
36
37/// Cache module for an efficient in-memory and persistent database.
38#[cfg(feature = "cache")]
39pub mod cache;
40
41#[cfg(feature = "cache")]
42pub(crate) mod cache_file;
43
44/// Chunked cache optimized for compilation artifacts
45#[cfg(feature = "compilation-cache")]
46pub mod compilation_cache;
47
48/// Module for benchmark timings
49pub mod benchmark;
50
51/// Module for profiling any executable part
52pub mod profile;
53
54/// Useful when you need to read async data without having to decorate each function with async
55/// notation.
56pub mod reader;
57
58/// Future utils with a compatible API for native, non-std and wasm environments.
59pub mod future;
60
61/// Quantization primitives required outside of `cubecl-quant`
62pub mod quant;
63
64/// Format utilities.
65pub mod format;
66
67/// Various utilities to create ID's.
68extern crate alloc;
69
70/// Hashing helper for stable, collision resistant hashes
71#[cfg(feature = "hash")]
72pub mod hash;
73
74/// Custom float implementations
75mod float;
76
77pub use float::*;