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/// Device module.
16pub mod device;
17
18/// Map utilities and implementations.
19pub mod map;
20
21/// Utilities module to manipulate bytes.
22#[cfg(feature = "serde")]
23pub mod bytes;
24
25/// Stub module contains types for stubs for non-std environments and for std environments.
26pub mod stub;
27
28/// Stream id related utilities.
29pub mod stream_id;
30
31/// Cache module for an efficient in-memory and persistent database.
32#[cfg(feature = "cache")]
33pub mod cache;
34
35#[cfg(feature = "cache")]
36pub(crate) mod cache_file;
37
38/// Module for benchmark timings
39pub mod benchmark;
40
41/// Module for profiling any executable part
42pub mod profile;
43
44/// Useful when you need to read async data without having to decorate each function with async
45/// notation.
46pub mod reader;
47
48/// Future utils with a compatible API for native, non-std and wasm environments.
49pub mod future;
50
51/// Quantization primitives required outside of `cubecl-quant`
52pub mod quant;
53
54/// Format utilities.
55pub mod format;
56
57/// Various utilities to create ID's.
58extern crate alloc;
59
60/// Custom float implementations
61mod float;
62/// Common kernel types
63mod kernel;
64
65pub use float::*;
66pub use kernel::*;