Upstream port — Netflix/vmaf 1b08bb4d (needs manual port)¶
Upstream commit: 1b08bb4d "runtime load CUDA driver libraries using nv-codec-headers and support clang compilation" — Maximilian Müller (NVIDIA), 2025-09-01.
Status: DRAFT — irreconcilable cherry-pick, needs manual rewrite.
What the upstream commit does¶
Restructures the fork's CUDA backend along three axes:
- Runtime-load CUDA driver libraries via
nv-codec-headers(<ffnvcodec/dynlink_loader.h>) instead of static-linkinglibcuda.soat build time. Removes hard build dependency on the CUDA Driver API stub library. - Clang+CUDA compilation support — drops the
nvcc-only assumption in the meson recipe soclangcan compile.cufiles directly (CUDA Toolkit headers + libs still required). - Dockerfile rewrite — collapses the separate
Dockerfile.cudaimage into the mainDockerfile; adds a newDockerfile.ffmpeg; removes redundant CUDA event recreation in extractors.
Why the cherry-pick failed¶
git cherry-pick 1b08bb4d against fork master produces 7 conflicting files plus one delete/modify conflict:
| file | conflict class |
|---|---|
core/src/feature/cuda/integer_motion/motion_score.cu | content |
core/src/feature/cuda/integer_motion_cuda.c | content |
core/src/feature/cuda/integer_vif_cuda.c | content |
core/src/libvmaf.c | content |
core/src/meson.build | content |
core/src/picture.h | content |
core/tools/vmaf.c | content |
resource/doc/docker.md | delete-vs-modify (fork removed resource/doc/) |
The fork's CUDA backend has progressed past the upstream baseline this patch was authored against — picture-pool refactors (T-GPU-DEDUP-1+), async pending-fence rings (T7-29), and several extractor-level refactors all touch the same lines. The patch shape no longer maps cleanly onto the fork.
Required manual-port plan¶
A future PR should re-implement each of the three axes independently:
nv-codec-headersruntime load — adopt<ffnvcodec/dynlink_loader.h>incore/src/cuda/common.c/common.h, replace the directlibcuda.solinkage incore/src/meson.build, and add a fallback path for environments withoutnv-codec-headersso existing CI rows keep working. Likely needs an ADR (build-system delta).- Clang+CUDA compilation — extend the existing
enable_cudameson option to detectnvccvsclanghost compiler and dispatch the rightcuda_args. Pairs with the fork's existing CI matrix (gcc / clang / nvcc). - Docker reorg — separate PR; fork already maintains its own
Dockerfiletopology (Dockerfile.ffmpeg, GPU images), so this is a docs/build-only refactor.
Each axis should land as its own port/ PR with the relevant ADR. This umbrella note exists so future readers see why the trivial /port-upstream-commit 1b08bb4d path is closed.
References¶
- Upstream commit: https://github.com/Netflix/vmaf/commit/1b08bb4da533fe3bc08700e4c1adb45f5adccc0b
- Sync-upstream report 2026-05-02:
docs/sync-upstream/2026-05-02-sync-report.mdon branchchore/sync-upstream-2026-05(PR #295), table "PORT — small fix worth picking", row1b08bb4d.