Skip to content

perf: enable apply_sparse_operator on Delaunay JAX profilers#65

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/enable-delaunay-sparse-profiling
May 16, 2026
Merged

perf: enable apply_sparse_operator on Delaunay JAX profilers#65
Jammy2211 merged 1 commit into
mainfrom
feature/enable-delaunay-sparse-profiling

Conversation

@Jammy2211
Copy link
Copy Markdown
Contributor

Summary

Enables apply_sparse_operator(use_jax=True) on the two Delaunay JAX profilers in jax_profiling/jit/. Per-fit curvature assembly now uses the FFT-based sparse precision-matrix preload instead of dense DFT per source pixel.

This was blocked by the NotImplementedError guard on Delaunay added in PyAutoLabs/PyAutoArray#315 and replaced by the actual math fix in PyAutoLabs/PyAutoArray#316.

Scripts Changed

  • jax_profiling/jit/interferometer/delaunay.py — new "apply_sparse_operator" timer section right after dataset_load, calling dataset.apply_sparse_operator(use_jax=True, show_progress=True). The 11 per-step JIT-profiled stages downstream now operate on the sparse-curvature path.
  • jax_profiling/jit/datacube/delaunay.py — chains .apply_sparse_operator(use_jax=True, show_progress=False) onto each per-channel from_fits in the dataset_list comprehension. 34-channel per-channel precision-matrix preload.

Upstream PR

Test plan

  • python jax_profiling/jit/interferometer/delaunay.py — end-to-end. Eager log_likelihood = -3152.876, figure_of_merit = -3167.526. All 11 per-step JIT stages completed. Results JSON + PNG written.
  • python jax_profiling/jit/datacube/delaunay.py — end-to-end on the hannah 34-channel cube. Eager cube log_evidence = -6964494.694 (regression assertion PASSED — agrees with the existing hardcoded reference, confirming the upstream library fix preserves correctness on the eager numpy path too). All 8 per-step JIT stages completed. Results JSON + PNG written.

🤖 Generated with Claude Code

Wire the now-unblocked apply_sparse_operator(use_jax=True) path into the
two Delaunay JAX profilers so per-fit curvature assembly uses the
FFT-based sparse precision-matrix preload instead of dense DFT per
source pixel. Unblocked by PyAutoLabs/PyAutoArray#316 (Pmax > 1
extent-indexing fix); the path was previously guarded with
NotImplementedError on Delaunay by PR #315.

- jax_profiling/jit/interferometer/delaunay.py: new
  "apply_sparse_operator" timer section right after dataset_load.
- jax_profiling/jit/datacube/delaunay.py: chain
  .apply_sparse_operator(use_jax=True, show_progress=False) onto the
  per-channel from_fits in the dataset_list comprehension.

Validation:
- jit/interferometer/delaunay.py: end-to-end run, eager log_likelihood
  = -3152.876, figure_of_merit = -3167.526, all 11 per-step JIT
  stages completed.
- jit/datacube/delaunay.py: end-to-end run on the hannah 34-channel
  cube, cube log_evidence = -6964494.694 (regression assertion
  PASSED), all 8 per-step JIT stages completed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release Pending release build label May 16, 2026
@Jammy2211 Jammy2211 merged commit d8e98cc into main May 16, 2026
@Jammy2211 Jammy2211 deleted the feature/enable-delaunay-sparse-profiling branch May 16, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release Pending release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant