Context
Parent: #11 | PRD: #10 | Design: docs/design/gpu-acceleration.md Section B, Temporal Filtering
Goal
Implement GPU-accelerated temporal filtering using torch.fft with coefficient-dimension chunking to fit in VRAM.
Acceptance Criteria
Blocked by
#14 (Slice 3) — needs phase arrays from forward pass to filter.
Files likely involved
motion_mag.py — _gpu_temporal_filter() function
Testing approach
- Unit test: filter output has same shape as input, finite values
- Unit test: DC signal (constant phase) passes through unchanged
- Unit test: chunked filter produces same result as single-chunk (small data that fits in one chunk)
- Speed test: verify GPU filter is faster than CPU
flattop_filter_1d on L0 data
Context
Parent: #11 | PRD: #10 | Design:
docs/design/gpu-acceleration.mdSection B, Temporal FilteringGoal
Implement GPU-accelerated temporal filtering using
torch.fftwith coefficient-dimension chunking to fit in VRAM.Acceptance Criteria
_gpu_temporal_filter(phase_arrays, magnification, width, device)modifies phase arrays in-placetorch.fft.rfft/irfftalong time axisfree_vram * 0.7 / (num_frames * 80 bytes FFT overhead)phase = phase0 + (phase - phase0) * magnificationBlocked by
#14 (Slice 3) — needs phase arrays from forward pass to filter.
Files likely involved
motion_mag.py—_gpu_temporal_filter()functionTesting approach
flattop_filter_1don L0 data