1#![cfg_attr(not(feature = "std"), no_std)]
2#![warn(missing_docs)]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4
5#[macro_use]
11extern crate derive_new;
12
13extern crate alloc;
14
15pub mod id;
17
18pub mod tensor;
20pub use tensor::*;
21
22pub mod data;
24pub use data::*;
25
26pub mod distribution;
28pub use distribution::*;
29
30pub mod element;
32pub use element::*;
33
34mod device_settings;
35pub use device_settings::*;
36
37pub mod runtime_kind;
39pub use runtime_kind::*;
40
41pub mod distributed;
43
44pub mod ops;
46pub use ops::*;
47
48pub mod config;
50
51pub use cubecl_zspace::errors::{self, *};
53
54#[cfg(feature = "network")]
56pub mod network;
57
58#[derive(Clone, Debug, Hash, Eq, PartialEq)]
65pub struct CommunicationId {
66 pub id: u64,
68}
69
70impl From<alloc::vec::Vec<cubecl_common::device::DeviceId>> for CommunicationId {
71 fn from(mut value: alloc::vec::Vec<cubecl_common::device::DeviceId>) -> Self {
72 use core::hash::{Hash, Hasher};
73 value.sort();
75 let mut hasher = ahash::AHasher::default();
76 value.hash(&mut hasher);
77 CommunicationId {
78 id: hasher.finish(),
79 }
80 }
81}
82
83pub use cubecl_common::bytes::*;
84pub use cubecl_common::device_handle::DeviceHandle;
85pub use cubecl_common::*;
86pub use half::{bf16, f16};
87
88pub use cubecl_common::flex32;