fill-voids: add build-fill-voids.yml for riscv64 wheels - #1472
Merged
Conversation
Cython/C++ extension by the seung-lab family (connected-components-3d, fastremap), no riscv64 wheel on PyPI or pypi.riseproject.dev. Mirrors upstream's own cibuildwheel job, narrowed to manylinux_riscv64, with numpy pinned to our registry for build+runtime (only-binary keeps pip from compiling it from sdist) and fastremap (a hard runtime import) built from sdist since it has no riscv64 wheel anywhere yet. automated_test.py loads its EM segmentation fixture via crackle-codec at module scope; that package has no riscv64 wheel and depends on pybind11/google_crc32c which don't either, so a patch swaps the fixture for an equivalent synthetic labeled volume built from numpy/scipy, keeping every test function and assertion unchanged.
luhenry
added a commit
that referenced
this pull request
Sep 7, 2026
…lume The hollow-sphere shells in the first synthetic test volume relied on a distance-threshold rasterization; at pixel resolution a thin circular/ spherical ring can have diagonal-only pinch points where scipy's default 4/6-connected flood fill and fill_voids' flood fill disagree on whether a cavity is enclosed (CI: test_scipy_comparison2d failed this way on cp312). Replace them with a 3x3x3 grid of non-overlapping hollow cubes with a 3-voxel-thick wall - axis-aligned rectangular walls have no diagonal ambiguity at any orientation, matching the pattern upstream's own test_2d_3d_differ already uses for its deterministic assertions.
test_scipy_comparison2d (and 3d) call fill_voids.fill(binimg, in_place=True) then run scipy's binary_fill_holes on that same binimg, which the in-place call has already mutated by that point; both functions snapshot the pristine input as orig_binimg first but never use it. Confirmed by reproducing in a plain aarch64 container (not riscv64-specific): 351 label/slice combinations checked exhaustively, comparing against the mutated binimg fails nondeterministically depending on which one runs, comparing against orig_binimg never does. Use orig_binimg in both functions; verified 5 full pytest runs green after the change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fill-voids2.1.2Compiles a Cython/C++ extension that fills voids in binary images. Upstream publishes no riscv64 wheel.
Mirrors upstream's
build_wheel.yml, narrowed to Linux/manylinux_riscv64.Differs from upstream
Testing
fastremapadded to test deps - hard runtime import, built from sdist (no riscv64 wheel yet).automated_test.pypatched - its fixture loads via crackle-codec, unavailable on riscv64.License: OK
Patches
0001-Fix-mutated-array-comparison-and-drop-crackle-codec.patch- To upstream (blocked). Swaps the crackle-loaded fixture for an equivalent synthetic labeled volume; also fixes a real bug where the 2D/3D scipy comparison ran against abinimgalready mutated by an earlier in-place fill call instead of the unusedorig_binimgsnapshot, reproduced independent of riscv64 (plain aarch64 container, 351 cases).Built on cp312/cp313/cp314/cp314t; CI running.