profiling: standardise on NUFFT + sparse operator across interferometer/datacube#31
Merged
Merged
Conversation
…er/datacube scripts All interferometer and datacube profiling scripts now use TransformerNUFFT + apply_sparse_operator(use_jax=True), which is the production-relevant likelihood path on A100. The DFT path was a stale historical default — PyAutoArray#329 made NUFFT compatible with apply_sparse_operator, and the chunked NUFFT (PyAutoArray#330) keeps the one-time dirty-image setup tractable at 1M+ visibility counts. Changes: - likelihood_runtime/interferometer/pixelization.py: add _build_transformer factory, switch to NUFFT - likelihood_breakdown/interferometer/delaunay.py: same, plus removed stale "pynufft is not JIT-friendly" comment - likelihood_breakdown/datacube/delaunay.py: replace single aggregated "sparse pipeline" step with proper per-step sparse-mode breakdown (D, F, reconstruction, log-evidence individually JIT-profiled) - Hilbert vertex count bumped from 500/1000 to 1500 across all delaunay scripts (matches imaging fiducial) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
TransformerNUFFT+apply_sparse_operator(use_jax=True)— the production-relevant likelihood path on A100.Context
apply_sparse_operatorcallsself.transformer.image_from(...)to compute the dirty image at setup time. With DFT this is O(N_pix × N_vis) — prohibitive at ALMA (1M vis × 800² pixels, hours on CPU). PyAutoArray#329 enabled NUFFT here; PyAutoArray#330 added chunking so 5M-vis ALMA_HIGH fits a 3 GB gather buffer per chunk vialax.scan.Results (A100 80 GB, 34 channels, 1500 verts)
Files changed
likelihood_runtime/interferometer/pixelization.py— DFT → NUFFT via_build_transformerfactorylikelihood_breakdown/interferometer/delaunay.py— same, plus removed stale "pynufft is not JIT-friendly" commentlikelihood_breakdown/datacube/delaunay.py— per-step sparse-mode breakdown (FFT W̃ curvature, sparse D, fast_chi²)likelihood_runtime/datacube/delaunay.py+likelihood_runtime/interferometer/delaunay.py— vertex bump to 1500Test plan
rtol=1e-4assertion against summedFitInterferometer.log_evidenceAUTOLENS_PROFILING_SMOKE=1🤖 Generated with Claude Code