Repository navigation
fix(cuda): download every plane of device input for CPU extractors - #1754
Merged
Merged
Conversation
2 of 7 tasks
lusoris
force-pushed
the
fix/cuda-device-input-chroma-download
branch
from
October 1, 2026 20:58
bd63e2b to
f8bbfce
Compare
…1754) * fix(cuda): download every plane of device input for CPU extractors translate_picture_device() copied the luma plane of a device picture into the host picture only. With device-resident input and an extractor on the CPU the chroma planes stayed uninitialised, and psnr_cb came out as the 60 dB cap where the CPU gives 12.54 dB, with no error (Netflix/vmaf#1613). The download now takes every plane the picture has, as the upload already does. test_cuda_device_input_host_extractors compares psnr y/cb/cr of device input with a CPU-only run at n_threads 0 and 4; it fails without the fix. * docs: regenerate the indexes and the citation map after rebasing
lusoris
force-pushed
the
fix/cuda-device-input-chroma-download
branch
from
October 1, 2026 21:41
f8bbfce to
c88f080
Compare
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With the pictures in device memory and an extractor that runs on the CPU, libvmaf copied the luma plane into the host picture only; the chroma planes stayed as
vmaf_picture_alloc()left them and the CPU extractor scored them without an error:psnr_cbcame out as the 60 dB cap where the CPU gives 12.54 dB. The device-to-host copy now takes every plane the picture has.Closes
T-CUDA-DEVICE-INPUT-CHROMA-NOT-DOWNLOADED-2026-10-01(found and closed here). Netflix/vmaf#1613 reports the same line on upstream. RC3, correctness (ADR-1421).Cause
translate_picture_device()incore/src/libvmaf.ccalledvmaf_cuda_picture_download_async(pic, pic_host, 0x1). The host-to-device upload next to it takes0x7(0x1for 4:0:0). A CPU extractor gets a device picture's host copy when a registered extractor has no CUDA twin or the context carries agpumask; the CUDA twins read the device pictures directly, so the default model on CUDA is not affected (psnr_cuday/cb/cr equal the CPU on the Netflix pair, host input, at--threads 0and4: 0.0 difference over 48 frames).Output on an RTX 4090
test_cuda_device_input_host_extractors(4 frames of noise on every plane at 192x128, pictures from theDEVICEpreallocation pool,gpumask = 1sopsnrruns on the CPU, everypsnr_y/psnr_cb/psnr_crcompared with==against a CPU-only run on the same pictures,n_threads0 and 4):threads=0 frame 0 psnr_cb: cpu=12.543948908054073 device-input=60, failType
fix— bug fixDeep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note —core/src/cuda/AGENTS.md, "Device-to-host picture download takes every plane".changelog.d/fixed/cuda-device-input-chroma-download.md.docs/rebase-notes.md, "translate_picture_device()downloads every plane".Reproducer
flock ~/.cache/vmafx-locks/cuda-4090.lock timeout 120 build/test/test_cuda_device_input_host_extractorsNotes
core/src/libvmaf.cis also touched by the ownership PR (ADR-1431) invmaf_read_pictures()andcheck_ring_buffer(); this change is intranslate_picture_device().core/test/meson.build(one block). No public API, ABI or FFmpeg patch impact. No Netflix golden assertion changed.