Skip to content

fill-voids: add build-fill-voids.yml for riscv64 wheels - #1472

Merged
luhenry merged 3 commits into
mainfrom
fill-voids
Sep 8, 2026
Merged

fill-voids: add build-fill-voids.yml for riscv64 wheels#1472
luhenry merged 3 commits into
mainfrom
fill-voids

Conversation

@luhenry

@luhenry luhenry commented Sep 7, 2026

Copy link
Copy Markdown
Member

Compiles 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

  • Pins numpy to our registry - only riscv64 wheel source, build+runtime dependency.

Testing

  • fastremap added to test deps - hard runtime import, built from sdist (no riscv64 wheel yet).
  • automated_test.py patched - 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 a binimg already mutated by an earlier in-place fill call instead of the unused orig_binimg snapshot, reproduced independent of riscv64 (plain aarch64 container, 351 cases).

Built on cp312/cp313/cp314/cp314t; CI running.

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.
@luhenry
luhenry merged commit ea053ce into main Sep 8, 2026
10 checks passed
@luhenry
luhenry deleted the fill-voids branch September 8, 2026 08:39
@luhenry luhenry linked an issue Sep 8, 2026 that may be closed by this pull request
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.

fill-voids riscv64 support

1 participant