You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parent: #11 | PRD: #10 | Design: docs/design/gpu-acceleration.md Sections D, E, F
Goal
Set up all GPU infrastructure so later slices can focus on the pipeline logic. After this slice, --gpu is accepted but prints "GPU pipeline not yet implemented" and exits. The Docker image builds and imports work.
Acceptance Criteria
Dockerfile.gpu based on pytorch/pytorch:2.1.2-cuda12.1-cudnn8-runtime with numpy<2, pytorch_wavelets from git
docker-build-gpu.sh reads VERSION, tags as motion-mag-dtcwt-gpu:{version} and :latest
requirements-gpu.txt with scipy, numpy<2, opencv-python-headless, PyWavelets
--gpu flag added to CLI (import-guarded: torch/pytorch_wavelets only imported when --gpu used)
--device flag (default: 0) for GPU selection
Clear error messages when --gpu used but torch or pytorch_wavelets not installed
Clear error message when --gpu used but no CUDA GPU available
Context
Parent: #11 | PRD: #10 | Design:
docs/design/gpu-acceleration.mdSections D, E, FGoal
Set up all GPU infrastructure so later slices can focus on the pipeline logic. After this slice,
--gpuis accepted but prints "GPU pipeline not yet implemented" and exits. The Docker image builds and imports work.Acceptance Criteria
Dockerfile.gpubased onpytorch/pytorch:2.1.2-cuda12.1-cudnn8-runtimewithnumpy<2,pytorch_waveletsfrom gitdocker-build-gpu.shreads VERSION, tags asmotion-mag-dtcwt-gpu:{version}and:latestrequirements-gpu.txtwith scipy, numpy<2, opencv-python-headless, PyWavelets--gpuflag added to CLI (import-guarded: torch/pytorch_wavelets only imported when--gpuused)--deviceflag (default: 0) for GPU selection--gpuused but torch or pytorch_wavelets not installed--gpuused but no CUDA GPU availableestimate_memory(num_frames, height, width, nlevels, gpu=False)returns(cpu_ram_bytes, vram_bytes)--gpuusedtest.shupdated withgpumode (builds GPU image, runs lint + tests).github/workflows/ci.ymlupdated with GPU job (lint only, no GPU on runners)Blocked by
Nothing — can be done in parallel with Slice 1.
Files likely involved
motion_mag.py— CLI flags, import guards, memory estimation, GPU detectionDockerfile.gpu— new filedocker-build-gpu.sh— new filerequirements-gpu.txt— new filetest.sh— add gpu mode.github/workflows/ci.yml— add GPU lint jobTesting approach
docker-build-gpu.shsucceedsdocker run --gpus device=0 ... --gpu --helpworksdocker run ... --gpu -i face.mp4prints "not yet implemented"docker run ... --gpuwithout GPU prints CUDA error