mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
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.