Skip to content

Test every waterfill implementation against the Default one - #1638

Merged
Gin890 merged 1 commit into
mainfrom
fix-waterfill-test-reference
Oct 21, 2026
Merged

Gin890 merged 1 commit into
mainfrom
fix-waterfill-test-reference

Conversation

@Gin890

@Gin890 Gin890 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Make the Waterfill kernel test a real test. It now compares each SIMD and NEON waterfill implementation that the CPU supports with the Default implementation, on real images.

Before, the test was debug code. It was not registered, so CI did not run it. It tested only the implementation that the dispatch picks, and on x86 its reference read the binary matrix in the wrong layout.

Other changes:

  • Sort the objects by position before the compare, because their order depends on the tile size.
  • Fail the test if the reference finds no objects in an image.
  • Remove the 3-second timing loop.

The images are from the CommandLineTests repo. No image has a width or height that is a multiple of 64, so the test also checks the edge tiles. #1633 and #1554 also change this file, so one of them will need a small merge fix.

0 test files added, 1 test file changed:

  • SerialPrograms/Source/Kernels/Waterfill/Kernels_Waterfill_Tests.cpp

Test results: all tests pass on all six CI runners. Each implementation runs on 3 images.

Runners Implementations tested
Windows Default, Ubuntu clang (AVX-512) SSE4.2, AVX2, AVX-512 64x32 and 64x64, AVX-512 GF 64x32 and 64x64
Ubuntu Default, Windows Clang, Mac Intel (AVX2) SSE4.2, AVX2
Mac (Apple Silicon) NEON

🤖 Generated with Claude Code

…mages

The Waterfill kernel test was debug code. It was not registered, it only
ran the implementation that the dispatch picks, and on x86 its reference
read the binary matrix in the wrong layout.

Add one test for each image and each SIMD or NEON implementation that
the CPU supports, and compare each one with the Default 64x4 code. The
images are from the CommandLineTests repo, and no image has a width or
height that is a multiple of 64. Remove the 3-second timing loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gin890
Gin890 force-pushed the fix-waterfill-test-reference branch from adec888 to 2b8832a Compare October 21, 2026 05:22
@Gin890 Gin890 changed the title Fix the reference results in the Waterfill kernel test Test every waterfill implementation against the Default one Oct 21, 2026
@Gin890
Gin890 merged commit f4235c6 into main Oct 21, 2026
7 checks passed
@Gin890
Gin890 deleted the fix-waterfill-test-reference branch October 21, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants