cubecl-common 0.9.0

Common crate for CubeCL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use cfg_aliases::cfg_aliases;

fn main() {
    if let Ok(family) = std::env::var("CARGO_CFG_TARGET_FAMILY")
        && family == "wasm"
    {
        println!("cargo:rustc-cfg=portable_atomic_unsafe_assume_single_core");
    }
    // Setup cfg aliases
    cfg_aliases! {
        multi_threading: { all(feature = "std", not(target_family = "wasm")) },
        // TODO: We can't yet activate it for everything because of how error handling is done in matmul.
        backtrace: { all(test, features="std") },
    }
}