mirror of
https://github.com/hanzoai/ml.git
synced 2026-11-19 23:50:51 +00:00
The kernel crates and the book are excluded from the workspace, so cargo walked up out of the repo looking for a root and adopted whatever sat above it -- publishing hanzo-metal-kernels died on "multiple workspace roots found" from two unrelated manifests in the parent directory. The two crates that already published, hanzo-bindgen-cuda and hanzo-flash-attn-build, carry their own [workspace]; now every excluded crate does, so none depends on what is above it. Co-authored-by: Hanzo Dev <[email protected]>
60 lines
2.3 KiB
TOML
60 lines
2.3 KiB
TOML
# Excluded from the repo workspace, so it is its own root: without this cargo walks up
|
|
# past the repo and adopts whatever workspace sits above it.
|
|
[workspace]
|
|
|
|
[package]
|
|
name = "hanzo-kernel"
|
|
version = "0.2.41"
|
|
edition = "2021"
|
|
description = "Hanzo's first-party GPU kernel DSL: one Rust source, lowered to CUDA/ROCm/Vulkan/Metal."
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/hanzoai/ml"
|
|
documentation = "https://docs.rs/hanzo-kernel"
|
|
readme = "README.md"
|
|
keywords = ["gpu", "kernel", "cuda", "vulkan", "metal"]
|
|
categories = ["hardware-support", "science"]
|
|
|
|
[dependencies]
|
|
# CubeCL is the lowering engine (the value); hanzo-kernel is the namespace (the place).
|
|
# Kernel source only ever names `hanzo_kernel::*` -- `cubecl` appears nowhere but this manifest.
|
|
cubecl = { version = "0.10", default-features = false }
|
|
hanzo-kernel-macros = { path = "../hanzo-kernel-macros", version = "0.1.1" }
|
|
half = "2"
|
|
# The ROCm backend deps our own published fork of cubecl-hip rather than the cubecl facade's `hip`
|
|
# feature: upstream cubecl-hip -> cubecl-hip-sys can't build on ROCm >= 7.13 (unknown-newer HIP patch),
|
|
# and a crates.io consumer can't inject the fix via `[patch.crates-io]`. `hanzo-cubecl-hip` (fork of
|
|
# cubecl-hip 0.10.0) pulls `hanzo-cubecl-hip-sys` (the build-fixed fork) and is imported as
|
|
# `hanzo_cubecl_hip`. It resolves the SAME cubecl-core 0.10 as the facade, so `HipRuntime` is the
|
|
# runtime the DSL dispatches through. Consumed from crates.io; fork source lives in git history.
|
|
hanzo-cubecl-hip = { version = "0.10", optional = true }
|
|
|
|
[features]
|
|
default = ["cpu"]
|
|
cpu = ["cubecl/cpu"]
|
|
vulkan = ["cubecl/wgpu", "cubecl/vulkan"]
|
|
spirv-dump = ["cubecl/spirv-dump"]
|
|
metal = ["cubecl/wgpu", "cubecl/metal"]
|
|
cuda = ["cubecl/cuda"]
|
|
# `cubecl/std` is required: cubecl-hip's server uses cubecl-runtime's `MultiStream`, which lives
|
|
# behind the `multi_threading` cfg = `all(feature="std", not(wasm))`. Without it the ROCm backend
|
|
# fails to compile (MultiStream unresolved). The HIP runtime itself comes from `hanzo-cubecl-hip`.
|
|
rocm = ["dep:hanzo-cubecl-hip", "cubecl/std"]
|
|
|
|
[[bin]]
|
|
name = "matvec-check"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "dp4a-probe"
|
|
path = "src/dp4a_probe.rs"
|
|
required-features = ["vulkan"]
|
|
|
|
[[bin]]
|
|
name = "mmq-check"
|
|
path = "src/mmq_check.rs"
|
|
|
|
[[bin]]
|
|
name = "flash-metal-check"
|
|
path = "src/flash_metal_check.rs"
|
|
required-features = ["metal"]
|