Repository navigation
Description
Two 3D VariationalRegistration tests — VariationalRegistrationGaussian3DTest and
VariationalRegistrationNCC3DTest — remain disabled after #6453 because their
ITK-proper baselines (generated on Ubuntu x86_64) diverge beyond the comparison
tolerance on the native macOS ARM64 runner. #6453 re-enabled the other 11
tests (7 2D + 4 3D); this issue tracks the remaining two.
Follow-up to #6305 (closed by #6453). The two baselines are already published to
ITKTestingData and pre-staged in main (their .cid files and
content-links.manifest entries landed with #6453), so re-enabling does not need
a new upload for a tolerance-based fix.
Why only these two — the regularizer signal
Both disabled tests are the only two that use the Gaussian / Thirion smoothing
regularizer:
VariationalRegistrationGaussian3DTest -r 0 -v 1.5 -u 0VariationalRegistrationNCC3DTest -f 2 -t 40 -r 0 -v 1 -u 0 -q 2 -p 1
Every passing 3D test uses diffusive / elastic / diffeomorphic regularization
(-r 1/-r 2). The recursive Gaussian smoothing of the deformation field
accumulates the most floating-point drift across the 3-level 3D pyramid, which is
why these two diverge most across platforms. #6305 measured the largest field
divergence for exactly these two (ImageError 23657 / 35693; max pixel Δ 149 / 136).
Established facts (from #6305)
- Deterministic per platform — identical ImageError on repeated runs; not a
threading race. - Not FFT-related — FFTW is off by default; FFT-gated tests are separately
disabled. - Cross-platform FP divergence, not a crash or wrong algorithm — stable
accumulated numeric difference between the x86_64 baseline-generation host and
macOS ARM64 (NEON / Apple clang). - Regenerating a single baseline on macOS only relocates the failure to the Linux
and Windows lanes (thepr-fixture-and-expected-valuesanti-pattern), so
single-baseline regeneration is ruled out.
Resolution plan
- Measure the macOS ARM64 delta against the committed x86_64 baseline: build
VariationalRegistration, run both tests, capture the test driver's
NumberOfPixelsWithDifferencesand max intensity Δ. This is the discriminator
and must run on Apple-silicon hardware (the divergence does not reproduce on
Linux). - Pick by measured magnitude:
- Per-test relaxed tolerance (preferred if bounded): give these two their
own larger--compareNumberOfPixelsTolerance(and/or intensity) instead of
the sharedVR_*_TOL;radius/intensitystill bound how far each pixel
may differ. Single baseline, one-line re-enable. - Multi-baseline (if the ARM64 field is a genuinely different-but-valid
convergence): add…Gaussian3DTest.1.nii.gz/…NCC3DTest.1.nii.gzmacOS
baselines and let--comparenumbered-baseline search pick the closest.
- Per-test relaxed tolerance (preferred if bounded): give these two their
- Re-enable the two
test3d(...)lines, re-point the in-code comments from the
now-closed VariationalRegistration: inherited baselines incompatible with ITK-proper (13 tests disabled pending cross-platform review) #6305 to this issue, and verify green specifically on the
macOS Pixi-Cxx lane that originally caught the divergence.
Activity
ENH: Re-enable Gaussian3D and NCC3D VariationalRegistration tests