Skip to content

CI: run the LibCI job on Ubuntu 26.04 - #15515

Merged
Nir-Az merged 3 commits into
realsenseai:developmentfrom
Nir-Az:libci-u26
Aug 6, 2026
Merged

Nir-Az merged 3 commits into
realsenseai:developmentfrom
Nir-Az:libci-u26

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Overview: Moves the system-nlohmann_json LibCI job from Ubuntu 24.04 to 26.04, so the unit tests run against a current toolchain instead of being untested there — and fixes the floating-point contraction that the move exposed.

Why

#15384 was a test-types-pose failure that only appears on Ubuntu 26.04, and it was invisible to this repo's CI. Only two Linux jobs run the untagged unit-test suite:

job runner filter runs test-types-pose
U22_SH_Py_CI ubuntu-22.04 --context "linux" yes
U24_SH_Py_CI_SYS_JSON ubuntu-24.04 --context "linux" yes
U22_U24_SH_Py_DDS_CI 22.04, 24.04 --tag dds no

U-Latest_ST_Py_EX_CfU does not help: it has no LibCI step, never passes -DBUILD_UNIT_TESTS (default OFF), and ubuntu-latest still resolves to ubuntu-24.04 on GitHub runners today.

The failure itself came from GCC 15.2 on 26.04 contracting multiply-adds into FMAs under the default -ffp-contract=fast, which shifted an intermediate rounding by one ULP and broke an exact float comparison in the test. That is the class of breakage this job is meant to catch — it surfaces on a toolchain bump, not on a code change.

Moving the job promptly surfaced a second instance of the same class, in post-processing/pytest-filters.py, which this PR also fixes.

Summary

  • U24_SH_Py_CI_SYS_JSON becomes U26_SH_Py_CI_SYS_JSON, runs-on: ubuntu-26.04. All steps unchanged.
  • Untagged Linux coverage becomes 22.04 + 26.04, bracketing 24.04.
  • 24.04 keeps build coverage (U22_U24_ST_Py_EX_CfU) and DDS-tagged LibCI (U22_U24_SH_Py_DDS_CI). What it loses is the untagged suite.
  • No new job, and no ruleset change — only LRS_libci_trigger is a required context.
  • CMake/unix_config.cmake builds with -ffp-contract=off.

Chose the flip over adding a 26.04 matrix entry to keep the job count flat. The matrix alternative costs one extra job and would preserve untagged 24.04 coverage, if that tradeoff is preferred.

The -ffp-contract=off fix

pytest-filters.py compares post-processing output byte-for-byte against a reference dataset. The spatial and temporal filters both compute x * alpha + y * (1 - alpha) in float (src/proc/temporal-filter.h, src/proc/spatial-filter.{h,cpp} — nine sites). GCC and Clang default to -ffp-contract=fast, which fuses one of those products into an FMA wherever the ISA has one, dropping an intermediate rounding. The 1-ULP drift is written back into the temporal filter's history buffer and compounds across a frame sequence; a few pixels per frame survive truncation to uint16 as a ±1 depth difference.

This is not specific to Ubuntu 26.04. FMA is in the base aarch64 ISA, so the same four cases already differ on ubuntu-24.04-arm with GCC 13.3 — identical cases, identical pixel counts. Jetson and Apple-Silicon builds have been producing filter output 1 LSB away from x86 and Windows all along; it went unnoticed because the Jetson LibCI stage runs --live, which skips this test. The 26.04 job made an existing cross-platform inconsistency visible rather than creating one.

-ffp-contract=off restores bit-identical results across toolchains. Where the ISA has no FMA — x86 up to 24.04, and Windows/MSVC — there is nothing to fuse, so codegen is unchanged and existing byte-exact jobs are unaffected. A source-level fix was rejected: -ffp-contract=fast ignores statement boundaries, so splitting the expression into temporaries does not reliably prevent fusion, and =on still fuses because it is a single expression.

Only the unix_config.cmake platforms are changed, since those are the ones measured here.

Test plan

  • Reproduced CI: Test failure when using the ubuntu 26.04 distribution #15384 on an ubuntu-26.04 runner and confirmed the merged test fix resolves it — three arms differing only in the line under test (upstream pose.h + exact compare: fail; contributor pose.h + exact compare: fail; + approximate compare: pass)
  • Confirmed the mechanism on the runner: gcc 15.2.0, -ffp-contract=fast, __FP_FAST_FMA defined; measured error 4.77e-07 against an eq() tolerance of 2.03e-06
  • Isolated the pytest-filters failure to FMA contraction with a six-arm experiment on ubuntu-26.04: -ffp-contract=off byte-exact; -fno-tree-vectorize and -O2 still failing (so not vectorization or optimization level); gcc-13 on 26.04 byte-exact; both runner CPU models present in passing and failing arms
  • Confirmed the same four cases fail on ubuntu-24.04-arm (aarch64, GCC 13.3) with identical pixel counts, and go byte-exact with the flag
  • Verified the flag reaches the real compile line from os_set_flags (not a command-line override) and that all fourteen cases are byte-exact on ubuntu-26.04, ubuntu-24.04-arm, and ubuntu-24.04
  • This PR's own U26_SH_Py_CI_SYS_JSON job green — first full-suite run on GCC 15.2, so unrelated failures are possible
  • LibCI run

🤖 Generated by AI

@sysrsbuild-gh-agentic sysrsbuild-gh-agentic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-generated by rs-agentic bot\n\nCI change looks correct — job rename and runner bump are consistent, no needs: references broken.\n\nTwo pre-existing patterns worth watching on 26.04:\n1. libglfw3 package (Prebuild step): transitional package renamed to libglfw3t64 since 24.04 — may be dropped on 26.04, breaking the apt step. Consider libglfw3t64 or confirm availability on the 26.04 runner.\n2. pip install without venv (Prebuild + LibCI pytest steps): PEP 668 externally-managed-environment may block bare pip calls on 26.04. Consider --break-system-packages or a venv.

@Nir-Az
Nir-Az requested a review from remibettan August 5, 2026 12:24
@Nir-Az Nir-Az changed the title CI: run the system-nlohmann_json LibCI job on Ubuntu 26.04 CI: run the LibCI job on Ubuntu 26.04 Aug 5, 2026
remibettan
remibettan previously approved these changes Aug 5, 2026
@Nir-Az

Nir-Az commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-generated by rs-agentic bot\n\nCI change looks correct — job rename and runner bump are consistent, no needs: references broken.\n\nTwo pre-existing patterns worth watching on 26.04:\n1. libglfw3 package (Prebuild step): transitional package renamed to libglfw3t64 since 24.04 — may be dropped on 26.04, breaking the apt step. Consider libglfw3t64 or confirm availability on the 26.04 runner.\n2. pip install without venv (Prebuild + LibCI pytest steps): PEP 668 externally-managed-environment may block bare pip calls on 26.04. Consider --break-system-packages or a venv.

Wrong, it tun and pass

@Nir-Az
Nir-Az merged commit b0e5e62 into realsenseai:development Aug 6, 2026
34 checks passed
@Nir-Az
Nir-Az deleted the libci-u26 branch August 6, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants