1.21 ms Event Optical Flow on CUDA Graphs: Why Displacement EPE and Fluid Vorticity Pick Opposite Winners
Profiling raw-event voxelization + CUDA Graph replay at 824.5 FPS on RTX 4060 Ti, and explaining why supervised correlation wins occluded EPE while unsupervised CMax wins vortex curl.
Where to Split the CUDA Graph Boundary for Raw Events
Asynchronous event packets vary wildly in length (242k–458k events per 20 ms pair in our held-out clips), preventing end-to-end static CUDA Graph capture over variable-length lists. Splitting the pipeline at the fixed-shape voxel grid boundary gives deterministic sub-2ms latency:
Within each 10 ms window, timestamps map to normalized bin coordinates (, ), and a flattened scatter-add kernel populates a static signed voxel tensor:
Copying into preallocated input buffers lets a captured CUDA Graph replay LiteERAFT (1/8-scale 4D correlation + 2 separable ConvGRU updates + convex upsampling) with zero kernel-launch overhead on an RTX 4060 Ti (batch = 1):
Profiling Scope (256×256, B=5, K=2) |
Median Synced Wall Time | Throughput |
|---|---|---|
| Pre-encoded voxel pair Eager PyTorch | 6.393 ms | 156.4 FPS |
| Pre-encoded voxel pair CUDA Graph replay | 0.710 ms | 1,408 FPS |
| GPU-resident raw events voxelization + Graph flow | 1.213 ms (P95 1.70 ms) | 824.5 FPS |
High-Speed Motion Blur: 46.5% Lower Endpoint Error than Frames
Synthesizing events and shutter-integrated frames from the exact same continuous irradiance trajectory under 3× fast motion and 100 Hz/px Poisson background noise, LiteERAFT on signed event voxels achieved 6.35 px EPE, beating the identical recurrent correlation architecture on blurred frames (11.86 px EPE, a 46.5% error reduction).
Why Vorticity Reverses the Leaderboard
Converting displacement into discrete vorticity via central differences flips the ranking between supervised correlation and label-free Contrast Maximization (CMax):
- On multi-layer occlusions,
LiteERAFTwins decisively (1.68 px vs.CMax4.94 px EPE); - On 12 continuous Lamb–Oseen / Rankine vortices, offline
CMax(861 ms/clip, warping events to maximize multi-reference focus with TV regularization) cuts instantaneous vorticity MAE to 5.55 s⁻¹, outperformingLiteERAFT(16.43 s⁻¹).
Pointwise L1/L2 displacement supervision tolerates tiny high-frequency pixel-to-pixel jitter that barely moves global EPE, yet dividing spatial differences by magnifies that jitter into large curl noise. Real-time obstacle perception favors LiteERAFT; fluid-gradient diagnostics require derivative-aware regularization.
Measured datasets & code: CUDA latency breakdown · Per-condition EPE summary · Vortex curl errors · MIT core source ZIP