Research-1317: Netflix Golden Gate Build Isolation and Compiler FP Contraction Drift¶
Item: T-GOLDEN-GATE-ICX-FP-DRIFT-2026-09-05 Date: 2026-09-25 Author: VMAFx maintainers ADR: ADR-1317
Summary¶
When running the local preflight or regression gate make test-netflix-golden (D24) on a development workstation whose core/build tree was configured using Intel oneAPI compilers (icx/icpx, identified as intel-llvm in Meson compiler introspection), the gate reported:
FAILED python/test/quality_runner_test.py::QualityRunnerTest::test_run_vmaf_runner_with_transform_score
FAILED python/test/quality_runner_test.py::QualityRunnerTest::test_run_vmaf_runner_with_transform_score2
FAILED python/test/quality_runner_test.py::QualityRunnerTest::test_run_vmaf_runner_with_transform_score3
FAILED python/test/quality_runner_test.py::QualityRunnerTest::test_run_vmaf_runner_with_transform_score4
FAILED python/test/quality_runner_test.py::QualityRunnerTest::test_run_vmaf_runner_with_transform_score5
FAILED python/test/quality_runner_test.py::QualityRunnerTest::test_run_vmaf_runner_with_transform_score6
FAILED python/test/vmafexec_test.py::VmafexecTest::test_run_vmafexec_with_transform_score
FAILED python/test/vmafexec_test.py::VmafexecTest::test_run_vmafexec_with_transform_score2
FAILED python/test/vmafexec_test.py::VmafexecTest::test_run_vmafexec_with_transform_score3
FAILED python/test/vmafexec_test.py::VmafexecTest::test_run_vmafexec_with_transform_score4
FAILED python/test/vmafexec_test.py::VmafexecTest::test_run_vmafexec_with_transform_score5
=========================== 11 failed, 260 passed, 12 skipped ===========================
This failure occurred on every branch regardless of the changes under test, producing misleading false alarms on developer workstations while passing in CI (which builds under GCC and Clang).
Root Cause Analysis¶
- Compiler Optimization and FP Contraction:
- Intel
icxdefaults to-ffp-contract=on(relaxed floating-point contraction). - GCC and standard Clang default to
-ffp-contract=off. - In floating-point convolution loops (
float_motionandfloat_vif),icxcontracts floating-point multiplications and additions into fused multiply-add (FMA) instructions. - The resulting intermediate rounding differences produce deltas of
7.1e-05to8.2e-05. -
The Netflix golden test suite asserts score equality via
assertAlmostEqual(..., places=4), which checksround(a - b, 4) == 0(ceiling ~0.00005). The7.1e-05delta exceeds this threshold, failing the assertion. -
Coupling Between Developer Build and Golden Gate:
-
Makefilepreviously defined: -
Target
buildoperates onBUILD_DIR = core/build. - If a developer had configured
core/buildwithicxto test SYCL or oneAPI targets,test-netflix-goldenreused that binary directly. -
compat/python-vmaf/__init__.pyhardcoded the search path:leaving no mechanism for the test harness to point to an alternate build profile.
Repair Architecture¶
- Build Directory Isolation:
- Dedicated
GOLDEN_BUILD_DIR ?= core/build-goldendistinct fromBUILD_DIR. - Target
build-goldenmanaged viascripts/ci/setup-golden-build.sh. - Clean target updated to remove
$(GOLDEN_BUILD_DIR). -
.gitignoreupdated withcore/build-golden/andbuild-golden/. -
Supported Compiler Enforcement (Fail-Closed):
scripts/ci/setup-golden-build.shprobes the compiler ID usingintro-compilers.json.- Permitted compilers for the golden profile are
gccandclang. - When configured with
intel-llvmor other non-deterministic compilers, the script fails immediately with an actionable error. -
Provides
--check-compiler <dir>mode for hermetic validation. -
Python Harness Environment Redirection:
compat/python-vmaf/__init__.pyreadsVMAF_BUILD_DIRfromos.environ, defaulting tocore/build.compat/python-vmaf/config.pysupportsVMAF_PATHandVMAFEXEC_PATHoverrides.test-netflix-goldenpassesVMAF_BUILD_DIR="$(CURDIR)/$(GOLDEN_BUILD_DIR)".
Verification Results¶
- Isolation & Contract Test Suite:
python/test/golden_gate_isolation_test.py: 9/9 tests pass (default paths, custom build paths, absolute paths, precedence over config, script executability, gcc/clang accept, intel-llvm reject, missing intro-compilers fail-closed).-
scripts/ci/tests/test_golden_gate_makefile_contract.py: 5/5 tests pass (variable definition, target definition, prereq isolation, recipe export, clean target). -
Real Golden Gate Execution:
-
Executing
make test-netflix-goldenagainstcore/build-golden: -
100% green without touching any Netflix assertion or baseline fixture.