burn_hip/
lib.rs

1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2extern crate alloc;
3
4#[cfg(target_os = "linux")]
5use burn_jit::JitBackend;
6
7#[cfg(target_os = "linux")]
8pub use cubecl::hip::HipDevice;
9
10#[cfg(target_os = "linux")]
11use cubecl::hip::HipRuntime;
12
13#[cfg(target_os = "linux")]
14#[cfg(not(feature = "fusion"))]
15pub type Hip<F = f32, I = i32, B = u8> = JitBackend<HipRuntime, F, I, B>;
16
17#[cfg(target_os = "linux")]
18#[cfg(feature = "fusion")]
19pub type Hip<F = f32, I = i32, B = u8> = burn_fusion::Fusion<JitBackend<HipRuntime, F, I, B>>;
20
21// TODO: Hang the computer when AMD isn't available.
22//
23// #[cfg(target_os = "linux")]
24// #[cfg(test)]
25// mod tests {
26//     use burn_jit::JitBackend;
27//
28//     pub type TestRuntime = cubecl::hip::HipRuntime;
29//     pub use half::{bf16, f16};
30//
31//     burn_jit::testgen_all!();
32// }