Repository navigation
fix(dev): stop preflight and the symbol check failing on out-of-scope input - #1475
Merged
Merged
Conversation
… input scripts/dev/preflight.sh swept every changed C file with gcc -m32, including the arm64, x86 SIMD and GPU trees that the i686 lane never compiles (it configures -Denable_asm=false and no GPU backend), and its missing-header filter did not know gcc's English message although the script runs under LC_ALL=C. A branch touching adm_neon.c or the AVX ADM files therefore failed the stage on missing intrinsics and arm_neon.h. The stage now skips those trees and accepts the message. check_exported_symbols failed in a sanitizer build linked with GNU ld, which exports the linker-defined __start_/__stop_ bounds of ASan's metadata section (lld, used by the CI sanitizer lane, hides them). Those bounds are now treated as runtime symbols; any other section bound still fails. The file's three ruff findings are cleared too.
… to check check-cuda-extern-c.sh (ADR-0747) expected cuModuleGetFunction(&fn, "name"), but every call passes the module first, so it collected no names and then aborted on the empty associative array under set -u. The check is rewritten: it reads the name from every call, including split ones, blanks comments and strings before counting braces, and names the macro-generated kernels it cannot locate. 48 of 71 kernels located, 0 unwrapped; removing an extern "C" block makes it fail with the kernel names.
… reuse build/ only when configured The m32 sweep still compiled per-backend GPU tests such as test_gpu_adm_tiny_frames.c, which only build with a backend define; it now takes the changed files the gcc stage's CPU build compiles (its compile_commands.json), minus the ISA trees the i686 lane leaves out. The gcc stage treated any existing build/ as configured and failed at ninja when build/ only held other build trees; it now checks for build/build.ninja. A planted 64-bit static assertion in a CPU file still fails the stage.
This was referenced Sep 18, 2026
Closed
lusoris
added a commit
that referenced
this pull request
Sep 19, 2026
…rements The CAMBI metric page's CPU SIMD section now has a per-stage table for AVX2, AVX-512 and NEON and says why the two aarch64 stages that stay scalar (the mask row and the mode filter) do: the compilers already vectorise those loops, so a NEON kernel removes no work. It explains why the AVX-512 and NEON c-values stage is so much faster than AVX2 (it skips the pixels that leave the histogram unchanged), gives the measured per-stage and whole-frame speed-ups, adds the aarch64 --cpumask example, and replaces the claim that the AVX-512 and NEON kernels predate the c-values layout, which was never the reason they were undispatched. The arm backend overview lists CAMBI's NEON coverage as full. Research-2065 holds the method (real frames, interleaved best-of-N timing under GCC, Clang and icx; qemu instruction counts for NEON), the per-stage and whole-frame numbers, why the c-values walk was bound by per-column bookkeeping rather than vector width, the register-pressure reason the AVX-512 scans stay out of line, and the decision for each previously dead kernel. docs/state.md closes T-CAMBI-SIMD-DEAD-KERNELS and T-CAMBI-AVX2-PARITY-TEST-NOOP and opens T-CAMBI-AVX2-CVALUES-LLVM: in Clang and icx builds, icx being the published container's compiler, the AVX2 c-values driver is about 0.8x of scalar. The two local-gate defects hit while validating this branch (check_exported_symbols in an ASan build, and preflight's 32-bit sweep on NEON sources) are fixed, with their own state rows, in #1475. The changelog fragment, the rebase note (all of this is fork-local; the dispatch additions must survive the next upstream rewrite of init()) and the x86 and arm64 AGENTS.md invariants complete the set.
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
Three local checks were wrong. Two failed on input they should not judge and made
make preflightreport failures on a correct branch (#1474); the third never checked anything. None of them runs in CI.scripts/dev/preflight.sh, 32-bit sweep. It rangcc -m32 -fsyntax-onlyover every changed C file, including thearm64/,x86/SIMD and GPU trees. TheUbuntu i686 gcclane it mirrors never compiles those: it configures-Denable_asm=falseand no GPU backend. So a change toadm_neon.cor the AVX ADM files failed the stage onarm_neon.hand_mm_extract_epi64. The missing-header filter also knew only clang'sfile not foundand the German gcc text, but the script runs underLC_ALL=C, so gcc'sNo such file or directorycounted as a failure. The stage now sweeps only the changed files thegccstage's CPU build compiles (itscompile_commands.json), which also leaves out the per-backend GPU tests that only build with a backend define, skips the ISA trees, and accepts that message. Thegccstage also reused any existingbuild/directory, even one holding only other build trees (build/cuda, ...), and then failed at ninja; it now requiresbuild/build.ninja.core/test/check_exported_symbols.py. In a sanitizer build linked with GNU ld,libvmaf.soexports the linker-defined__start_asan_globals/__stop_asan_globals, the bounds of ASan's metadata section. lld, which the CI sanitizer lane uses, hides them. They are runtime artefacts, not API, so the checker now treats the__start_/__stop_bounds of the ASan, HWASan and SanitizerCoverage sections as runtime-owned. Any other section bound still fails. The file's three pre-existing ruff findings are cleared as well.scripts/dev/check-cuda-extern-c.sh(ADR-0747). It never checked a kernel. Its regex expectedcuModuleGetFunction(&fn, "name"), but every call passes the module first, so it collected nothing and then aborted on the empty list underset -u. Rewritten: it reads every call, including split ones, blanks comments and strings before counting braces, and names the 23 macro-generated kernels it cannot locate instead of passing them. It reports 48 of 71 located and 0 unwrapped, and fails with the kernel names when anextern "C"block is removed.The real i686+asm limitation behind the first point (
_mm_extract_epi64inadm_avx2.c/adm_avx512.c) is unchanged and stays as ADR-0151 records it.Type
feat— new featurefix— bug fixperf— performance improvementrefactor— no behavior changedocs— documentation onlytest— test-onlybuild/ci— tooling / infraport— cherry-pick from upstream Netflix/vmafsycl/cuda/simd— backend-specificChecklist
make format && make lintis green locally.meson test -C build./cross-backend-diffand the worst ULP is ≤ 2: no kernel code touched..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md): no new files.!orBREAKING CHANGE:and the migration path is documented below: not breaking.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt: no ADR.Bug-status hygiene (ADR-0165)
docs/state.md:T-PREFLIGHT-M32-FALSE-FAILURES-2026-09-18,T-EXPORTED-SYMBOLS-ASAN-GNU-LD-2026-09-18andT-CUDA-EXTERN-C-CHECK-VACUOUS-2026-09-18, all closed.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
changelog.d/fixed/preflight-m32-asan-symbols.md,changelog.d/fixed/cuda-extern-c-check.md.Reproducer
Verified locally
preflight.sh --stage m32on #1474's and the GPU branch's trees_Static_assertin a CPU file still fails itcheck_exported_symbols.pyon a GNU-ld ASan, a release and a SYCLlibvmaf.so__start_mysection,__stop_vmaf_table, a leaked function namecheck-cuda-extern-c.shon master / with oneextern "C"block removedKnown follow-ups