cubecl-runtime 0.10.0

Crate that helps creating high performance async runtimes for CubeCL.
Documentation
[package]
authors = ["louisfd <louisfd94@gmail.com>", "Nathaniel Simard"]
categories = ["science"]
description = "Crate that helps creating high performance async runtimes for CubeCL."
edition.workspace = true
keywords = ["deep-learning", "machine-learning", "data"]
license.workspace = true
name = "cubecl-runtime"
readme.workspace = true
repository = "https://github.com/tracel-ai/cubecl/tree/main/crates/cubecl-runtime"
version.workspace = true


[lints]
workspace = true


[features]
autotune-checks = []
channel-cell = []
channel-mpsc = []
channel-mutex = []
default = [
    "std",
    "channel-mutex",
    "channel-mpsc",
    "channel-cell",
    "storage-bytes",
    "cubecl-common/default",
]
exclusive-memory-only = []
profile-tracy = ["dep:tracy-client"]
std = ["cubecl-common/std", "toml", "dirs", "thiserror/std"]
storage-bytes = []

tracing = ["dep:tracing", "cubecl-common/tracing", "cubecl-ir/tracing"]

[dependencies]
# Runtime Deps
log = { workspace = true }
tracing = { workspace = true, features = ["attributes"], optional = true }

async-channel = { workspace = true } # Assume std
bytemuck = { workspace = true }
cfg-if = { workspace = true }
cubecl-common = { path = "../cubecl-common", version = "0.10.0", default-features = false }
cubecl-ir = { path = "../cubecl-ir", version = "0.10.0", default-features = false, features = [
    "serde",
] }
cubecl-zspace = { path = "../cubecl-zspace", version = "0.10.0", default-features = false }
derive-new = { workspace = true }
derive_more = { workspace = true, features = ["eq"] }
dirs = { workspace = true, optional = true }
enumset = { workspace = true }
hashbrown = { workspace = true }
serde = { workspace = true }
toml = { workspace = true, optional = true }
web-time = { workspace = true }

thiserror = { workspace = true }
ahash = { version = "0.8.12", default-features = false }
md5 = { workspace = true }

# Persistent cache deps - has to match the cfg(std_io) cfg.
[target.'cfg(any(target_os = "windows", target_os = "linux", target_os = "macos", target_os = "android"))'.dependencies]
cubecl-common = { path = "../cubecl-common", version = "0.10.0", default-features = false, features = [
    "cache",
    "serde",
    "hash",
] }
serde_json = { workspace = true, features = ["std"] }

# Tracy if enabled.
tracy-client = { workspace = true, optional = true }

[target.'cfg(target_has_atomic = "ptr")'.dependencies]
spin = { workspace = true, features = ["mutex", "spin_mutex"] }


[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
spin = { workspace = true, features = [
    "mutex",
    "spin_mutex",
    "portable_atomic",
] }


[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen-futures = { workspace = true }

[dev-dependencies]
rand = { workspace = true, features = ["thread_rng"] }
serial_test = { workspace = true }
test-log = { workspace = true, features = ["trace"] }

[build-dependencies]
cfg_aliases = { workspace = true }

[[bench]]
harness = false
name = "dynamic"