Repository navigation
feat(v4.6.0): full Python API, universal pure-Python wheel, and fast wheel CI - #304
Merged
Merged
Conversation
…heel CI
- Expose remaining C++ capabilities in Python (with full pure-Python solver parity):
- 3-D steady-state potential field output (return_field=True) on TortuosityMLMG & TortuosityHypre
- Multi-phase transport (phase_diffusivities={phase_id: D_i}) with scale-invariant solver tolerances
- Full 3x3 periodic homogenisation tensor (effective_diffusivity / EffectiveDiffusivityResult)
- Microstructural metrics: specific_surface_area, connected_components, particle_size_distribution, through_thickness_profile, and rev_study
- Non-cubic / physical SI voxel spacing (voxel_size=(dz, dy, dx)) across VoxelImage, solvers, SSA, PSD, and CLI (--voxel-size)
- Add OPENIMPALA_PURE_PYTHON CMake install path and publish universal py3-none-any fallback wheel alongside manylinux x86_64 wheels
- Speed up CPU & CUDA wheel CI via ccache 4.10.2 + core cache-warmer + parallel Python version matrix
- Strip intermediate non-alloc __nv_relfatbin RDC section post-device-link and enable CUDA fatbin size compression (-compress-mode=size) to keep dual-SASS (sm_80 + sm_89) CUDA wheels well below PyPI's 320 MB limit
Performance Benchmark ResultsUniform Block (Analytical τ = 1.0)
Porous Media (MLMG vs HYPRE PCG+SMG, ~55% Porosity)
Fastest uniform solver: mlmg at 64³ (0.0263s) Benchmark: uniform block (analytical τ = 1.0) + smoothed Gaussian porous media |
Code Coverage ReportGenerated by CI — coverage data from gcovr |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This was referenced Nov 17, 2026
Closed
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.
Summary
Implements the v4.6.0 milestone: exposes the remaining C++ capabilities in Python with full pure-Python solver parity, publishes a universal
py3-none-anyfallback wheel alongside themanylinuxwheels, speeds up CPU/CUDA wheel CI withccache+ parallel Python matrices, and fixes the dual-SASS (sm_80+sm_89) CUDA wheel size ceiling.1. Full Python API (
openimpala&_corebindings)oi.tortuosity(..., return_field=True)populatesTortuosityResult.solution_field((nz, ny, nx)float64NumPy array, gathered safely across CUDA device memory and MPI ranks) andTortuosityResult.effective_diffusivity.phase_diffusivities={phase_id: D_i}supported acrossTortuosityMLMG,TortuosityHypre,EffectiveDiffusivityHypre,DeffTensor, and the pure-Python solver, with scale-invariant residual and flux-conservation thresholds for physical SI diffusivities (e.g.oi.effective_diffusivity(...)->EffectiveDiffusivityResultsolving the three periodic homogenisation cell problems and assembling the fullreturn_chi=True).oi.specific_surface_area(...)->SpecificSurfaceAreaResult(raw & Cauchy–Crofton[1/length]units, directional face counts, boundary padding)oi.connected_components(...)->ConnectedComponentsResult(6-connected flood-fill component counts, volumes, optional 3-Dlabelsarray)oi.particle_size_distribution(...)->ParticleSizeDistributionResult(equivalent-sphere radii & volumes in voxel and physical units)oi.through_thickness_profile(...)->ThroughThicknessResult(slice-by-slice volume fraction & physical slice coordinates)oi.rev_study(...)->REVStudyResult(multi-window Representative Elementary Volume convergence study)voxel_size=(dz, dy, dx)(scalar or 3-tuple) supported acrossVoxelImage.from_numpy,VoxelImage.with_voxel_size,tortuosity,effective_diffusivity,specific_surface_area,particle_size_distribution,through_thickness_profile, andopenimpala analyze --voxel-size.2. Universal Pure-Python Fallback Wheel (
py3-none-any)-DOPENIMPALA_PURE_PYTHON=ONtoCMakeLists.txt(LANGUAGES NONE) and added apy3-none-anywheel build + verification step in.github/workflows/pypi-wheels-cpu.ymlsopip install openimpalaworks out of the box on macOS, Windows, ARM64 Linux, and non-MPI environments.3. Fast Wheel CI & CUDA Wheel Size Reduction
pypi-wheels-cpu.ymlandpypi-wheels-gpu.ymlinto a Stage-1cp39core cache-warmer (ccache 4.10.2with fixedSKBUILD_BUILD_DIRandFETCHCONTENT_BASE_DIR) followed by a parallel 4-way[cp310, cp311, cp312, cp313]matrix soopenimpala_ioandopenimpala_propsare compiled once instead of 5 times.POST_BUILDstep on_core(whenGPU_BACKEND=CUDA) to strip the non-alloc__nv_relfatbinintermediate RDC section (~276 MiB) afternvcc -dlinkresolves device symbols into.nv_fatbin, plus-Xfatbin=-compress-all -Xfatbin=-compress-mode=sizeSASS fatbin compression and an automated< 315 MBwheel-size check inbundle_gpu_wheels.Verification
python/tests/test_v460_features.pyand multi-rank MPI field/metric tests inpython/tests/test_mpi_smoke.py.workflow_dispatchverification on both CPU and GPU wheel workflows once PR CI passes.