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