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!(f32: [f16, f32], i32: [i16, i32], u32: [u16, u32]);
30    cubecl_std::testgen!();
31    cubecl_linalg::testgen_matmul_tiling2d!([f16, f32]);
32    cubecl_linalg::testgen_matmul_accelerated!([f16]);
33    cubecl_linalg::testgen_matmul_simple!([f16, f32]);
34    cubecl_linalg::testgen_tensor_identity!([f32, u32]);
35    cubecl_reduce::testgen_reduce!([f16, bf16, f32, f64]);
36    cubecl_reduce::testgen_shared_sum!([f32]);
37}