cubecl_cpp/
lib.rs

1#[macro_use]
2extern crate derive_new;
3
4pub mod shared;
5
6pub use shared::ComputeKernel;
7pub use shared::register_supported_types;
8pub use shared::{Dialect, DialectWmmaCompiler};
9
10/// Format CPP code.
11pub mod formatter;
12
13#[cfg(feature = "hip")]
14pub mod hip;
15#[cfg(feature = "hip")]
16pub type HipDialectIntrinsic = hip::HipDialect<hip::mma::WmmaIntrinsicCompiler>;
17#[cfg(feature = "hip")]
18pub type HipDialectRocWmma = hip::HipDialect<hip::mma::RocWmmaCompiler>;
19
20// The hip dialects use the cuda dialect sometimes this is why we need it for hip feature as well
21#[cfg(any(feature = "cuda", feature = "hip"))]
22pub mod cuda;
23#[cfg(any(feature = "cuda", feature = "hip"))]
24pub type CudaCompiler = shared::CppCompiler<cuda::CudaDialect>;
25
26#[cfg(feature = "metal")]
27pub mod metal;
28#[cfg(feature = "metal")]
29pub type MslCompiler = shared::CppCompiler<metal::MslDialect>;