cubecl_hip/
lib.rs

1#[allow(unused_imports)]
2#[macro_use]
3extern crate derive_new;
4extern crate alloc;
5
6#[cfg(target_os = "linux")]
7pub mod compute;
8#[cfg(target_os = "linux")]
9pub mod device;
10#[cfg(target_os = "linux")]
11pub mod runtime;
12#[cfg(target_os = "linux")]
13pub use device::*;
14#[cfg(target_os = "linux")]
15pub use runtime::HipRuntime;
16#[cfg(target_os = "linux")]
17#[cfg(feature = "wmma-intrinsics")]
18pub(crate) type HipWmmaCompiler = cubecl_cpp::hip::mma::WmmaIntrinsicCompiler;
19#[cfg(target_os = "linux")]
20#[cfg(not(feature = "wmma-intrinsics"))]
21pub(crate) type HipWmmaCompiler = cubecl_cpp::hip::mma::RocWmmaCompiler;
22
23#[cfg(target_os = "linux")]
24#[cfg(test)]
25mod tests {
26    use half::{bf16, f16};
27    pub type TestRuntime = crate::HipRuntime;
28
29    cubecl_core::testgen_all!();
30    cubecl_linalg::testgen_matmul_plane!([f32]);
31    cubecl_linalg::testgen_matmul_accelerated!([f32]);
32    cubecl_reduce::testgen_reduce!([f16, bf16, f32, f64]);
33}