Skip to content

Slice 6: GPU integration — magnify_motions_gpu(), tests, docs #17

Description

@joeljose

Context

Parent: #11 | PRD: #10 | Design: docs/design/gpu-acceleration.md

Goal

Wire all GPU passes together into magnify_motions_gpu(), add comprehensive tests, update docs, and prepare for release.

Acceptance Criteria

  • magnify_motions_gpu(data, magnification, width, nlevels, biort, qshift, device) orchestrates Pass 1 → Filter → Pass 2
  • main() calls magnify_motions_gpu() when --gpu is set (replaces "not yet implemented" stub from Slice 2)
  • GPU path prints GPU name, VRAM, batch sizes at startup
  • End-to-end: python motion_mag.py --gpu -i face.mp4 produces valid output
  • tests/test_motion_mag_gpu.py with all tiers:
    • Tier 1: memory estimation
    • Tier 2: forward/inverse roundtrip, phase extraction shapes, batched consistency, filter shapes
    • Tier 3: full pipeline smoke test on face.mp4
  • All existing CPU tests still pass
  • README updated with GPU usage section (--gpu, Docker GPU setup, VRAM requirements)
  • CHANGELOG updated
  • VERSION bumped to 2.0.0

Blocked by

#16 (Slice 5) — needs all GPU passes implemented.

Files likely involved

  • motion_mag.pymagnify_motions_gpu() orchestration, main() integration
  • tests/test_motion_mag_gpu.py — new file
  • README.md — GPU section
  • CHANGELOG.md — v2.0.0 entry
  • VERSION — bump to 2.0.0

Testing approach

  • ./test.sh — all CPU tests pass
  • ./test.sh gpu — all GPU tests pass
  • Manual: compare GPU output video against CPU output for visual quality
  • Manual: test on different video resolutions

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