Skip to content

GPU-accelerated motion magnification — implementation tracker #11

Description

@joeljose

Feature: GPU-Accelerated Motion Magnification

PRD: #10
Design Doc: docs/design/gpu-acceleration.md

Adds --gpu flag to motion_mag.py for ~17x speedup via pytorch_wavelets + cuFFT. Includes CPU improvements (FFT filter optimization already applied, wavelet filter upgrade).

Slices

Dependency Graph

Slice 1 (filters)  ──────────────────────────────────┐
Slice 2 (infra) → Slice 3 (Pass 1) → Slice 4 (filter) → Slice 5 (Pass 2) → Slice 6 (integration)

Slices 1 and 2 can be done in parallel.

Key Decisions (from design doc)

  • Single file (motion_mag.py) with --gpu flag, not separate file
  • Two-pass batched GPU pipeline (phase on CPU between passes)
  • 3× C=1 sequential channels (not C=3 batching)
  • Chunked cuFFT for temporal filtering (auto-tuned to VRAM)
  • Re-run forward DTCWT in Pass 2 (no amplitude/Yl storage)
  • near_sym_b/qshift_b as new default filters
  • Float32 everywhere on GPU (verified negligible error)
  • Pre-flight CPU RAM + VRAM check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions