mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 14:17:52 +00:00
Hoist Tensor::arange (timestep freqs) and Tensor::from_vec (causal mask) out of the per-forward hot loop to model init, eliminating a CPU-GPU sync per DiT forward (~310 per 10-step rollout). Parity preserved bit-exact (DiT cosine 1.000000). Also: example now reports per-stage timing (vae-enc/dit/vae-dec). This is also the precondition for capturing the fixed-shape denoise step as a CUDA graph.