1#[macro_use]
2extern crate derive_new;
3
4extern crate alloc;
5
6mod compiler;
7mod compute;
8mod device;
9mod element;
10mod graphics;
11mod runtime;
12
13pub use compiler::wgsl::WgslCompiler;
14pub use compute::*;
15pub use device::*;
16pub use element::*;
17pub use graphics::*;
18pub use runtime::*;
19
20#[cfg(feature = "spirv")]
21pub use compiler::spirv;
22
23#[cfg(test)]
24#[allow(unexpected_cfgs)]
25mod tests {
26 pub type TestRuntime = crate::WgpuRuntime<crate::WgslCompiler>;
27
28 cubecl_core::testgen_all!();
29 cubecl_linalg::testgen_matmul_plane!([f32]);
30 cubecl_linalg::testgen_matmul_accelerated!([f32]);
31 cubecl_linalg::testgen_matmul_tiling2d!([flex32, f32]);
32 cubecl_linalg::testgen_matmul_simple!([flex32, f32]);
33 cubecl_reduce::testgen_reduce!();
34}
35
36#[cfg(all(test, feature = "spirv"))]
37#[allow(unexpected_cfgs)]
38mod tests_spirv {
39 pub type TestRuntime = crate::WgpuRuntime<crate::spirv::VkSpirvCompiler>;
40 use cubecl_core::flex32;
41 use half::f16;
42
43 cubecl_core::testgen_all!(f32: [f16, flex32, f32, f64], i32: [i8, i16, i32, i64], u32: [u8, u16, u32, u64]);
44 cubecl_linalg::testgen_matmul_plane!([f16, f32]);
45 cubecl_linalg::testgen_matmul_tiling2d!([f16, f32, f64]);
46 cubecl_linalg::testgen_matmul_simple!([f32]);
47 cubecl_linalg::testgen_matmul_accelerated!([f16]);
48 cubecl_reduce::testgen_reduce!();
49}