diff --git a/crates/cubecl-core/src/frontend/synchronization.rs b/crates/cubecl-core/src/frontend/synchronization.rs index 13acf6fd..23c197b0 100644 --- a/crates/cubecl-core/src/frontend/synchronization.rs +++ b/crates/cubecl-core/src/frontend/synchronization.rs @@ -10,7 +10,7 @@ use crate::ir::Synchronization; /// /// * Then all the invocations in the cube wait for each other to arrive at the barrier, i.e. this step. /// -/// * Then all the invocations int he cube begin executing after the barrier, and any writes to cube address space that were made before the barrier are now visible to any invocation in this cube. +/// * Then all the invocations int the cube begin executing after the barrier, and all writes to cube address space made before the barrier are now visible to any invocation in this cube. pub fn sync_units() {} pub mod sync_units { diff --git a/crates/cubecl-core/src/prelude.rs b/crates/cubecl-core/src/prelude.rs index f1fe573a..2ac05973 100644 --- a/crates/cubecl-core/src/prelude.rs +++ b/crates/cubecl-core/src/prelude.rs @@ -14,13 +14,6 @@ pub use crate::frontend::{ }; pub use crate::pod::CubeElement; -/// Topology -pub use crate::frontend::{ - ABSOLUTE_POS, ABSOLUTE_POS_X, ABSOLUTE_POS_Y, ABSOLUTE_POS_Z, CUBE_COUNT, CUBE_COUNT_X, - CUBE_COUNT_Y, CUBE_COUNT_Z, CUBE_DIM, CUBE_DIM_X, CUBE_DIM_Y, CUBE_DIM_Z, CUBE_POS, CUBE_POS_X, - CUBE_POS_Y, CUBE_POS_Z, PLANE_DIM, UNIT_POS, UNIT_POS_X, UNIT_POS_Y, UNIT_POS_Z, -}; - /// Export plane operations. pub use crate::frontend::{plane_all, plane_max, plane_min, plane_prod, plane_sum}; pub use cubecl_runtime::client::ComputeClient; diff --git a/crates/cubecl-cuda/Cargo.toml b/crates/cubecl-cuda/Cargo.toml index b86afadc..859a2402 100644 --- a/crates/cubecl-cuda/Cargo.toml +++ b/crates/cubecl-cuda/Cargo.toml @@ -47,6 +47,8 @@ cubecl-core = { path = "../cubecl-core", version = "0.4.0", features = [ cubecl-linalg = { path = "../cubecl-linalg", version = "0.4.0", features = [ "export_tests", ] } -cubecl-reduce = { path = "../cubecl-reduce", version = "0.4.0" } +cubecl-reduce = { path = "../cubecl-reduce", version = "0.4.0", features = [ + "export_tests", +] } paste = { workspace = true } pretty_assertions = { workspace = true } diff --git a/crates/cubecl-hip/Cargo.toml b/crates/cubecl-hip/Cargo.toml index df54fb33..67c6cfac 100644 --- a/crates/cubecl-hip/Cargo.toml +++ b/crates/cubecl-hip/Cargo.toml @@ -43,5 +43,7 @@ cubecl-core = { path = "../cubecl-core", version = "0.4.0", features = [ cubecl-linalg = { path = "../cubecl-linalg", version = "0.4.0", features = [ "export_tests", ] } -cubecl-reduce = { path = "../cubecl-reduce", version = "0.4.0" } +cubecl-reduce = { path = "../cubecl-reduce", version = "0.4.0", features = [ + "export_tests", +] } pretty_assertions = { workspace = true } diff --git a/crates/cubecl-reduce/Cargo.toml b/crates/cubecl-reduce/Cargo.toml index 7b8808bf..0f580934 100644 --- a/crates/cubecl-reduce/Cargo.toml +++ b/crates/cubecl-reduce/Cargo.toml @@ -5,7 +5,7 @@ authors = [ "maxtremblay " ] categories = ["science", "mathematics", "algorithms"] -description = "CubeCL Standard Library." +description = "CubeCL Reduce Algorithms." edition.workspace = true keywords = [] license.workspace = true @@ -21,8 +21,10 @@ default = [ "cubecl-core/default" ] std = ["cubecl-runtime/std", "cubecl-core/std"] +export_tests = ["pretty_assertions"] [dependencies] cubecl-core = { path = "../cubecl-core", version = "0.4.0", default-features = false } cubecl-runtime = { path = "../cubecl-runtime", version = "0.4.0", default-features = false } num-traits = "0.2.19" +pretty_assertions = { workspace = true, optional = true } diff --git a/crates/cubecl-reduce/src/lib.rs b/crates/cubecl-reduce/src/lib.rs index fbf84a80..5f157485 100644 --- a/crates/cubecl-reduce/src/lib.rs +++ b/crates/cubecl-reduce/src/lib.rs @@ -1,3 +1,4 @@ -pub mod test; - pub mod sum; + +#[cfg(feature = "export_tests")] +pub mod test; diff --git a/crates/cubecl-wgpu/Cargo.toml b/crates/cubecl-wgpu/Cargo.toml index ea6596f4..944e900f 100644 --- a/crates/cubecl-wgpu/Cargo.toml +++ b/crates/cubecl-wgpu/Cargo.toml @@ -52,7 +52,9 @@ cubecl-core = { path = "../cubecl-core", version = "0.4.0", features = [ cubecl-linalg = { path = "../cubecl-linalg", version = "0.4.0", features = [ "export_tests", ] } -cubecl-reduce = { path = "../cubecl-reduce", version = "0.4.0" } +cubecl-reduce = { path = "../cubecl-reduce", version = "0.4.0", features = [ + "export_tests", +] } half = { workspace = true } paste = { workspace = true } pretty_assertions = { workspace = true }