Files
zeekay a5397cc135 feat(flow-ml): real hanzo-ml binding — GpuResident seam made concrete
MlDevice wraps hanzo_ml::Device (CPU/CUDA/Metal/…); MlTensor wraps
hanzo_ml::Tensor — already an Arc-backed device-resident handle, so it IS the
DeviceTensor abstraction concretely (zero-copy step-to-step). The same steps
run on CPU or GPU; only the Device ctor differs (MlDevice::cpu vs ::cuda).

flow-core stays std-only — hanzo-ml lives behind this crate so hanzo-desktop
embeds flow-core alone (tiny) or flow-ml (with compute) as needed. Verified on
CPU (no GPU): a real affine op runs through GpuResidentBackend, 1.0→2.0, result
resident on the injected device. 2/2, clippy clean. cuda/metal features forward
to hanzo-ml for on-GPU residence.
2026-07-16 19:21:15 -07:00

22 lines
763 B
TOML

[package]
name = "flow-ml"
version = "0.1.0"
edition = "2021"
rust-version = "1.88"
description = "The hanzo-ml binding for flow-core: MlDevice/MlTensor make the GpuResident seam concrete. Same steps run on CPU or GPU — only the Device ctor differs. CPU by default; enable `cuda`/`metal` for on-GPU residence."
license = "MIT"
[lib]
name = "flow_ml"
# flow-core stays std-only; the heavy compute dep lives here, behind this crate, so
# hanzo-desktop can embed flow-core alone (tiny) or flow-ml (with hanzo-ml) as needed.
[dependencies]
flow-core = { path = "../core-rs" }
hanzo-ml = { path = "../../ml/hanzo-ml" }
[features]
# CPU by default (default = []). A GPU-resident build just forwards to hanzo-ml.
cuda = ["hanzo-ml/cuda"]
metal = ["hanzo-ml/metal"]