Skip to content

fix(ci): silence clang's fp-override driver note so the SYCL tidy lane measures the x86 SIMD units - #1867

Merged
lusoris merged 1 commit into
masterfrom
fix/sycl-tidy-overriding-option
Oct 2, 2026
Merged

lusoris merged 1 commit into
masterfrom
fix/sycl-tidy-overriding-option

Conversation

@lusoris

@lusoris lusoris commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

make tidy-ratchet LANE=sycl has exited 4 on master since #1829: 151 of the 1 706 translation units of an icx build are reported as compile failures, so no baseline entry of the x86 SIMD libraries, core/src/dnn/ or their tests can be measured or tightened in that lane. One line in scripts/ci/clang-tidy-sycl.sh fixes it.

Cause

  • ADR-1461 (fix(build): build every C and C++ file without FP contraction so aarch64 clang and GCC builds agree (ADR-1461) #1829) made vmaf_strict_fp_args a project argument. A target that also names it compiles with -fp-model=precise -ffp-contract=off -fp-model=precise -ffp-contract=off. icx accepts the repeat.
  • The wrapper rewrites -fp-model= to clang's -ffp-model= in a copy of the compile database. Stock clang's driver then prints warning: overriding '-ffp-model=precise' option with '-ffp-contract=off' [clang-diagnostic-overriding-option], with no file and no line.
  • scripts/ci/tidy-ratchet.py fails closed on a warning it cannot place: the unit counts as a compile failure and the lane exits 4.
  • Units that carry the pair once (1 520, and the 29 SYCL sources) are not affected, which is why the SYCL kernel PRs of the day did not see it.

The compile commands are right as built (contraction off comes last), so the wrapper passes -Wno-overriding-option next to the two driver suppressions it already had. No check is disabled and no build argument changes.

Verified on ryzen-4090-arc

old wrapper this PR
vif_avx2.c, convolution_avx.c, psnr_avx2.c, motion_avx2.c in the sycl lane 4 compile failures 0
python3 -B -m unittest discover -s scripts/ci/tests -p 'test_tidy_ratchet.py' 2 of the 3 new cases fail 43 of 43

The three new cases (SyclWrapperDriverWarnings): the ratchet's parser marks the driver warning as a failure (the reason the wrapper has to silence it); the wrapper hands -Wno-overriding-option to clang-tidy (a fake tool, no oneAPI needed); real clang-tidy, when installed, measures a unit built with the repeated pair with exit 0 and without the warning (skipped where clang-tidy is absent).

Not run: the whole sycl lane (1 706 units). The count of 151 is read from the compile database; four of them were measured.

Type

  • feat — new feature
  • fix — bug fix
  • perf — performance improvement
  • refactor — no behavior change
  • docs — documentation only
  • test — test-only
  • build / ci — tooling / infra
  • port — cherry-pick from upstream Netflix/vmaf
  • sycl / cuda / simd — backend-specific

Checklist

  • Commits follow Conventional Commits (the commit-msg hook enforces this).
  • make format && make lint is green locally. (The commit hooks on the touched files: shfmt, shellcheck, ruff, black, markdownlint.)
  • Unit tests pass: python3 scripts/ci/run_meson_test.py -- -C build. (No C source changes; the script's own suite: 43 of 43.)
  • If I touched any SIMD/GPU code path, I ran /cross-backend-diff and the worst ULP is ≤ 2. (No source file is touched.)
  • If I touched a feature extractor with SIMD/GPU twins, I either updated every twin or listed the gap under "Known follow-ups" below. (Not touched.)
  • If I added a new .c / .cpp / .cu / .h / .hpp, it has the appropriate license header (see CONTRIBUTING.md). (None added.)
  • If this is a breaking change, the commit message uses ! or BREAKING CHANGE: and the migration path is documented below. (Not breaking.)
  • If this PR adds an ADR, the ADR row lives in docs/adr/_index_fragments/<NNNN-slug>.md. (No ADR: a one-line repair of an existing wrapper; ADR-1290 and ADR-1461 stand.)

Bug-status hygiene (ADR-0165)

  • docs/state.md updated in this PR. T-SYCL-TIDY-OVERRIDING-OPTION-2026-10-02, found and closed.

Netflix golden-data gate (ADR-0024)

  • I did not modify any assertAlmostEqual(...) score in the Netflix golden Python tests.
  • If I believe a golden value must change, I have explained why below AND pinged @lusoris for a CODEOWNERS exception. (None changes.)

Deep-dive deliverables (ADR-0108)

  • Research digest — no digest needed: trivial; the cause is in the state row.
  • Decision matrix — no alternatives: only-one-way fix. Reordering the build's arguments would undo ADR-1461's order; teaching the ratchet to ignore location-less warnings would weaken its fail-closed rule for every lane.
  • AGENTS.md invariant note — scripts/ci/AGENTS.d/sycl-tidy-lane.md, "The wrapper silences one driver note".
  • Reproducer / smoke-test command — pasted below under "Reproducer".
  • CHANGELOG fragment — changelog.d/fixed/sycl-tidy-overriding-option.md.
  • Rebase note — docs/rebase-notes.md, "SYCL tidy wrapper: -Wno-overriding-option".

Reproducer

source /opt/intel/oneapi/setvars.sh
CC=icx CXX=icpx meson setup /tmp/tidy-sycl core -Denable_sycl=true -Db_lto=false
ninja -C /tmp/tidy-sycl include/vcs_version.h
python3 scripts/ci/write-compile-commands.py --build-dir /tmp/tidy-sycl
python3 scripts/ci/gen-sycl-compile-commands.py /tmp/tidy-sycl
python3 scripts/ci/tidy-ratchet.py --lane sycl --build-dir /tmp/tidy-sycl \
  --clang-tidy "$PWD/scripts/ci/clang-tidy-sycl.sh" \
  --only core/src/feature/x86/motion_avx2.c      # master: compile failure, exit 4
python3 -B -m unittest discover -s scripts/ci/tests -p 'test_tidy_ratchet.py'

Known follow-ups

  • None.

@github-actions github-actions Bot added the type:bug Something isn't working label Oct 2, 2026
…e measures the x86 SIMD units (#1867)

* fix(ci): silence clang's fp-override driver note so the SYCL tidy lane measures the x86 SIMD units

Since ADR-1461 (#1829) made the strict FP arguments project-wide, a target
that also names them compiles with `-fp-model=precise -ffp-contract=off`
twice. icx accepts the repeat. After the wrapper's `-fp-model=` to
`-ffp-model=` rewrite, stock clang's driver prints `warning: overriding
'-ffp-model=precise' option with '-ffp-contract=off'`, without a source
location. The ratchet fails closed on a warning it cannot place, so 151 of
the 1 706 translation units of an icx build (the x86 SIMD libraries,
core/src/dnn, their tests) were compile failures and
`make tidy-ratchet LANE=sycl` exited 4.

scripts/ci/clang-tidy-sycl.sh passes -Wno-overriding-option. The build's
argument order is the intended one and no check is disabled.

Measured on ryzen-4090-arc: vif_avx2.c, convolution_avx.c, psnr_avx2.c and
motion_avx2.c are 4 compile failures with the old wrapper and 0 with this
one. test_tidy_ratchet.py gains three cases; two fail on the old wrapper.

Closes T-SYCL-TIDY-OVERRIDING-OPTION-2026-10-02.
@lusoris
lusoris force-pushed the fix/sycl-tidy-overriding-option branch from dfc2ff1 to fb87c7f Compare October 2, 2026 15:55
@lusoris
lusoris merged commit fb87c7f into master Oct 2, 2026
3 of 78 checks passed
@lusoris
lusoris deleted the fix/sycl-tidy-overriding-option branch October 2, 2026 15:55

This branch was successfully deployed

1 active deployment
github-pages — fb87c7f4 Deployed Oct 2, 2026 by lusoris via deploy #4030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant