Skip to content

profiling: standardise on NUFFT + sparse operator across interferometer/datacube#31

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-optimal-nufft
May 28, 2026
Merged

profiling: standardise on NUFFT + sparse operator across interferometer/datacube#31
Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-optimal-nufft

Conversation

@Jammy2211
Copy link
Copy Markdown
Contributor

Summary

  • All interferometer/datacube profiling scripts now use TransformerNUFFT + apply_sparse_operator(use_jax=True) — the production-relevant likelihood path on A100.
  • Added per-step sparse-mode breakdown for datacube (replaces the previous aggregated "sparse pipeline" step with individually-profiled D, F, reconstruction, log-evidence steps using the W̃ FFT kernel).
  • Bumped Hilbert vertex count from 500/1000 to 1500 across delaunay scripts (matches imaging fiducial).

Context

apply_sparse_operator calls self.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 via lax.scan.

Results (A100 80 GB, 34 channels, 1500 verts)

Config Cube total Curvature F Shared L^T W̃ L savings est.
SMA fp64 1.74 s 0.21 s 0.20 s (11.7%)
ALMA fp64 2.26 s 0.74 s 0.72 s (31.8%)
ALMA HIGH fp64 4.82 s 3.15 s 3.06 s (63.5%)

Files changed

  • likelihood_runtime/interferometer/pixelization.py — DFT → NUFFT via _build_transformer factory
  • likelihood_breakdown/interferometer/delaunay.py — same, plus removed stale "pynufft is not JIT-friendly" comment
  • likelihood_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 1500

Test plan

  • SMA fp64/mp + ALMA fp64/mp + ALMA_HIGH fp64/mp HPC breakdown jobs all passed rtol=1e-4 assertion against summed FitInterferometer.log_evidence
  • All scripts pass AUTOLENS_PROFILING_SMOKE=1

🤖 Generated with Claude Code

…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>
@Jammy2211 Jammy2211 merged commit 9676db7 into main May 28, 2026
0 of 2 checks passed
@Jammy2211 Jammy2211 deleted the feature/interferometer-optimal-nufft branch May 28, 2026 10:51
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.

1 participant