diff --git a/README.md b/README.md index 74ab05475..358712ef8 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Results are framed by **astronomy instrument** (HST, Euclid, JWST, …) rather t | `imaging/delaunay` | hst | hpc_a100_mp | dense (mapping) | 96.8 ms | v2026.7.6.649 | | `imaging/delaunay` | hst | hpc_a100_mp | sparse (w-tilde) | 95.5 ms | v2026.7.6.649 | | `imaging/delaunay_numba` | euclid | local_cpu_fp64 | sparse (numba) | 1.19 s | v2026.8.17.1 | -| `imaging/delaunay_numba` | hst | local_cpu_fp64 | sparse (numba) | 3.22 s | v2026.8.17.1 | +| `imaging/delaunay_numba` | hst | local_cpu_fp64 | sparse (numba) | 679.2 ms | v2026.8.17.1 | | `imaging/mge` | hst | local_cpu_fp64 | dense (mapping) | 179.5 ms | v2026.7.6.649 | | `imaging/mge` | hst | hpc_a100_fp64 | dense (mapping) | 7.8 ms | v2026.7.6.649 | | `imaging/pixelization` | hst | local_cpu_fp64 | dense (mapping) | 8.65 s | v2026.7.6.649 | @@ -71,8 +71,8 @@ Results are framed by **astronomy instrument** (HST, Euclid, JWST, …) rather t | `imaging/pixelization` | hst | hpc_a100_fp64 | sparse (w-tilde) | 57.9 ms | v2026.7.6.649 | | `imaging/pixelization` | hst | hpc_a100_mp | dense (mapping) | 56.4 ms | v2026.7.6.649 | | `imaging/pixelization` | hst | hpc_a100_mp | sparse (w-tilde) | 55.5 ms | v2026.7.6.649 | -| `imaging/pixelization_numba` | euclid | local_cpu_fp64 | sparse (numba) | 2.10 s | v2026.8.17.1 | -| `imaging/pixelization_numba` | hst | local_cpu_fp64 | sparse (numba) | 21.57 s | v2026.8.17.1 | +| `imaging/pixelization_numba` | euclid | local_cpu_fp64 | sparse (numba) | 288.6 ms | v2026.8.17.1 | +| `imaging/pixelization_numba` | hst | local_cpu_fp64 | sparse (numba) | 691.5 ms | v2026.8.17.1 | The tables above are auto-generated by `scripts/misc/tooling/build_readme.py` from the artifacts under [`results/`](./results/README.md) — never edit them by hand; run `python scripts/misc/tooling/build_readme.py` after a profiling run and commit the result (CI checks idempotence via `--check`). Narrative context — per-cell "where to optimize next" recommendations and the mp-vs-fp64 verdicts — lives in [`scripts/misc/likelihood_runtime/OPTIMIZATION_NOTES.md`](./scripts/misc/likelihood_runtime/OPTIMIZATION_NOTES.md). diff --git a/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.json b/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.json index 1e6674d50..4c02451d3 100644 --- a/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.json +++ b/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.json @@ -25,29 +25,34 @@ "omp_num_threads": "1" }, "steps": { - "FitImaging construct": 0.00010670000006030023, - "Blurred image (FFT convolve)": 0.019015520000039032, - "Profile subtracted image": 0.00010823000002346816, - "Inversion build (trace+Delaunay+mapper)": 0.05277517000004082, - "PSF-weighted data [numba]": 0.01558175999998639, - "MGE operated mapping matrix (60 funcs)": 0.4349745199998779, - "Mapper sparse triplets": 0.030901940000103423, - "Data vector D [numba]": 0.008124649999899702, - "Curvature matrix F [numba sparse-op]": 1.7725606600000448, - "Regularization matrix H (ConstantSplit)": 0.13839846999994734, - "F + H": 0.003469200000108685, - "Reconstruction solve (BLAS)": 0.5417054600000938, - "Mapped reconstruction [numba+FFT]": 0.006093289999989792, - "Model data + chi^2": 0.006790640000008352, - "log det (F+H) [Cholesky]": 0.050793790000079754, - "log det H [Cholesky]": 0.04692912999998953, - "Regularization term s'Hs": 0.0011736499999642548, - "Log evidence (figure of merit)": 0.0934743499999513 + "FitImaging construct": 7.37200001367455e-05, + "Blurred image (FFT convolve)": 0.010467500000095243, + "Profile subtracted image": 5.2989999994679236e-05, + "Inversion build (trace+Delaunay+mapper)": 0.02722744000016064, + "PSF-weighted data [numba]": 0.008432200000015655, + "MGE operated mapping matrix (60 funcs)": 0.2072877299999618, + "Mapper sparse triplets": 0.018328900000051364, + "Data vector D [numba]": 0.004825830000118003, + "F: mapper\u00d7mapper block [sparse-op]": 0.12305467000014687, + "F: mapper\u00d7linear-func block [FFT conv + scatter]": 0.0515464300000076, + "F: linear-func\u00d7linear-func block [BLAS]": 0.01916231999989577, + "Curvature matrix F [residual: mirror + diag-add]": -0.010250559999940373, + "Regularization matrix H (ConstantSplit)": 0.0681292599999324, + "F + H": 0.002749279999989085, + "Reconstruction solve (BLAS)": 0.03926761000002443, + "Mapped reconstruction [numba+FFT]": 0.0034941299999900364, + "Model data + chi^2": 0.003210120000039751, + "log det (F+H) [Cholesky]": 0.02755216999998993, + "log det H [Cholesky]": 0.024576129999877593, + "Regularization term s'Hs": 0.0007812499999545252, + "Log evidence (figure of merit)": 0.0492773199999192 }, - "total_step_by_step": 3.222977130000208, - "direct_log_likelihood_function_per_call": 3.664489109999977, - "warmup_incl_numba_compile_s": 5.48075499999959, - "log_likelihood": 29090.52721044813, + "total_step_by_step": 0.6792464400003608, + "curvature_matrix_f_total_s": 0.18351286000010986, + "curvature_matrix_f_split_note": "The four 'F: ...' / 'Curvature matrix F' rows sum to curvature_matrix_f_total_s, the raw un-split cost of the inversion.curvature_matrix step. The three block rows are direct measurements of the (uncached) per-block helpers in imaging_numba/sparse.py; the 'Curvature matrix F [residual: ...]' row is t(curvature_matrix) minus those three, i.e. the global mirror, the no-regularization diagonal add and assembly overhead, and it carries the combined noise of the four timings. PyAutoArray#505 step 0.", + "direct_log_likelihood_function_per_call": 0.7576715100000001, + "warmup_incl_numba_compile_s": 4.814360099999703, + "log_likelihood": 29090.527210448134, "pinned_expected": 29090.527192092646, "pinned_drift": [] } \ No newline at end of file diff --git a/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.png b/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.png index 78f046425..36e82c12b 100644 Binary files a/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.png and b/results/breakdown/imaging/delaunay_numba_breakdown_hst_v2026.8.17.1.png differ diff --git a/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.json b/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.json index e081f4442..5ad6c2511 100644 --- a/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.json +++ b/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.json @@ -17,6 +17,7 @@ 28, 28 ], + "rect_mesh": "bilinear", "source_pixels": 784, "inversion_path": "sparse_numba", "use_jax": false, @@ -24,29 +25,34 @@ "omp_num_threads": "1" }, "steps": { - "FitImaging construct": 7.580000001325971e-05, - "Blurred image (FFT convolve)": 0.011992690000261064, - "Profile subtracted image": 3.1340000168711414e-05, - "Inversion build (trace+mesh+mapper)": 0.01467940999991697, - "PSF-weighted data [numba]": 0.0022784300001148948, - "MGE operated mapping matrix (60 funcs)": 0.4157829399999173, - "Mapper sparse triplets": 1.099141320000126, - "Data vector D [numba]": 0.0009452199999941513, - "Curvature matrix F [numba sparse-op]": 0.2405917899999622, - "Regularization matrix H": 0.001643829999738955, - "F + H": 0.0006582800004252931, - "Reconstruction solve (BLAS)": 0.267646330000025, - "Mapped reconstruction [numba+FFT]": 0.0066464899999118645, - "Model data + chi^2": 0.006479599999511265, - "log det (F+H) [Cholesky]": 0.008570310000141034, - "log det H [Cholesky]": 0.007837470000049506, - "Regularization term s'Hs": 0.0003200899998773821, - "Log evidence (figure of merit)": 0.015268050000304356 + "FitImaging construct": 7.546999995611259e-05, + "Blurred image (FFT convolve)": 0.008001979999926334, + "Profile subtracted image": 3.681000011965807e-05, + "Inversion build (trace+mesh+mapper)": 0.01710581000006641, + "PSF-weighted data [numba]": 0.0026192299999820536, + "MGE operated mapping matrix (60 funcs)": 0.10346844000009696, + "Mapper sparse triplets": 0.0016650700000354845, + "Data vector D [numba]": 0.001205819999859159, + "F: mapper\u00d7mapper block [sparse-op]": 0.06530645000011645, + "F: mapper\u00d7linear-func block [FFT conv + scatter]": 0.022554969999964668, + "F: linear-func\u00d7linear-func block [BLAS]": 0.004474150000078225, + "Curvature matrix F [residual: mirror + diag-add]": 0.004506459999856813, + "Regularization matrix H": 0.004038749999972424, + "F + H": 0.0012899899999865739, + "Reconstruction solve (BLAS)": 0.0099663199999668, + "Mapped reconstruction [numba+FFT]": 0.0015609000000040396, + "Model data + chi^2": 0.001559590000033495, + "log det (F+H) [Cholesky]": 0.010603099999934784, + "log det H [Cholesky]": 0.00950673000002098, + "Regularization term s'Hs": 0.0004289500000595581, + "Log evidence (figure of merit)": 0.018604910000021846 }, - "total_step_by_step": 2.1005893900004584, - "direct_log_likelihood_function_per_call": 2.258366720000049, - "warmup_incl_numba_compile_s": 3.257500200001232, - "log_likelihood": 5860.175003697541, + "total_step_by_step": 0.28857990000005884, + "curvature_matrix_f_total_s": 0.09684203000001616, + "curvature_matrix_f_split_note": "The four 'F: ...' / 'Curvature matrix F' rows sum to curvature_matrix_f_total_s, the raw un-split cost of the inversion.curvature_matrix step. The three block rows are direct measurements of the (uncached) per-block helpers in imaging_numba/sparse.py; the 'Curvature matrix F [residual: ...]' row is t(curvature_matrix) minus those three, i.e. the global mirror, the no-regularization diagonal add and assembly overhead, and it carries the combined noise of the four timings. PyAutoArray#505 step 0.", + "direct_log_likelihood_function_per_call": 0.24940190999996048, + "warmup_incl_numba_compile_s": 2.1857472000001508, + "log_likelihood": 6213.306873885871, "pinned_expected": null, "pinned_drift": [] } \ No newline at end of file diff --git a/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.png b/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.png index c0ade5f95..4e7f698d1 100644 Binary files a/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.png and b/results/breakdown/imaging/pixelization_numba_breakdown_euclid_v2026.8.17.1.png differ diff --git a/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.json b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.json index 08bc99bd2..3ebd3341a 100644 --- a/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.json +++ b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.json @@ -17,6 +17,7 @@ 28, 28 ], + "rect_mesh": "bilinear", "source_pixels": 784, "inversion_path": "sparse_numba", "use_jax": false, @@ -24,29 +25,34 @@ "omp_num_threads": "1" }, "steps": { - "FitImaging construct": 8.171999979822431e-05, - "Blurred image (FFT convolve)": 0.022798310000325728, - "Profile subtracted image": 7.074999957694672e-05, - "Inversion build (trace+mesh+mapper)": 0.029194960000131685, - "PSF-weighted data [numba]": 0.009886089999781689, - "MGE operated mapping matrix (60 funcs)": 0.8668588700002147, - "Mapper sparse triplets": 18.802446930000407, - "Data vector D [numba]": 0.004903690000355709, - "Curvature matrix F [numba sparse-op]": 1.2400383800000783, - "Regularization matrix H": 0.0022586600000067845, - "F + H": 0.0007666800000151852, - "Reconstruction solve (BLAS)": 0.5279153000003134, - "Mapped reconstruction [numba+FFT]": 0.014945690000058676, - "Model data + chi^2": 0.014683259999583243, - "log det (F+H) [Cholesky]": 0.009715300000243588, - "log det H [Cholesky]": 0.008949740000025486, - "Regularization term s'Hs": 0.0004129599999942002, - "Log evidence (figure of merit)": 0.01778383000018948 + "FitImaging construct": 8.33399999919493e-05, + "Blurred image (FFT convolve)": 0.01084737999999561, + "Profile subtracted image": 6.784000001971435e-05, + "Inversion build (trace+mesh+mapper)": 0.026095339999892532, + "PSF-weighted data [numba]": 0.008763999999928274, + "MGE operated mapping matrix (60 funcs)": 0.22401575999997475, + "Mapper sparse triplets": 0.005336110000007466, + "Data vector D [numba]": 0.0052595000000565054, + "F: mapper\u00d7mapper block [sparse-op]": 0.27679772000001324, + "F: mapper\u00d7linear-func block [FFT conv + scatter]": 0.05443964000005508, + "F: linear-func\u00d7linear-func block [BLAS]": 0.021487699999988764, + "Curvature matrix F [residual: mirror + diag-add]": 0.0066316599999936, + "Regularization matrix H": 0.0018421100000068692, + "F + H": 0.0008287500000278669, + "Reconstruction solve (BLAS)": 0.00876641000008931, + "Mapped reconstruction [numba+FFT]": 0.003643519999968703, + "Model data + chi^2": 0.0037507700000787734, + "log det (F+H) [Cholesky]": 0.008669489999920187, + "log det H [Cholesky]": 0.007879109999976208, + "Regularization term s'Hs": 0.00032316000001628706, + "Log evidence (figure of merit)": 0.015974480000113544 }, - "total_step_by_step": 21.573711120001104, - "direct_log_likelihood_function_per_call": 21.254453419999844, - "warmup_incl_numba_compile_s": 24.729626099999223, - "log_likelihood": 22803.4728745572, - "pinned_expected": null, + "total_step_by_step": 0.6915037900001153, + "curvature_matrix_f_total_s": 0.3593567200000507, + "curvature_matrix_f_split_note": "The four 'F: ...' / 'Curvature matrix F' rows sum to curvature_matrix_f_total_s, the raw un-split cost of the inversion.curvature_matrix step. The three block rows are direct measurements of the (uncached) per-block helpers in imaging_numba/sparse.py; the 'Curvature matrix F [residual: ...]' row is t(curvature_matrix) minus those three, i.e. the global mirror, the no-regularization diagonal add and assembly overhead, and it carries the combined noise of the four timings. PyAutoArray#505 step 0.", + "direct_log_likelihood_function_per_call": 0.5949823200000083, + "warmup_incl_numba_compile_s": 4.023859600000378, + "log_likelihood": 27661.91013366411, + "pinned_expected": 27661.910133665442, "pinned_drift": [] } \ No newline at end of file diff --git a/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.png b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.png index 836d21d2d..2e974322a 100644 Binary files a/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.png and b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1.png differ diff --git a/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1_rtu.json b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1_rtu.json new file mode 100644 index 000000000..f1727d9d3 --- /dev/null +++ b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1_rtu.json @@ -0,0 +1,58 @@ +{ + "autolens_version": "2026.8.17.1", + "device": { + "backend": "cpu", + "device": "cpu:0", + "xla_flags": "--xla_disable_hlo_passes=constant_folding --xla_gpu_autotune_level=0", + "omp_num_threads": "1", + "cpu_count": 8 + }, + "instrument": "hst", + "configuration": { + "pixel_scale_arcsec": 0.05, + "mask_radius_arcsec": 3.5, + "image_pixels_masked": 15361, + "over_sampled_pixels": 17980, + "mesh_shape": [ + 28, + 28 + ], + "rect_mesh": "rtu", + "source_pixels": 784, + "inversion_path": "sparse_numba", + "use_jax": false, + "lens_light": "mge_60_linear", + "omp_num_threads": "1" + }, + "steps": { + "FitImaging construct": 6.170000001475273e-05, + "Blurred image (FFT convolve)": 0.01020472999980484, + "Profile subtracted image": 5.66400000025169e-05, + "Inversion build (trace+mesh+mapper)": 0.024389229999997042, + "PSF-weighted data [numba]": 0.00845435000001089, + "MGE operated mapping matrix (60 funcs)": 0.20154515999997785, + "Mapper sparse triplets": 7.080621299999985, + "Data vector D [numba]": 0.00409297999995033, + "F: mapper\u00d7mapper block [sparse-op]": 0.24928207000002658, + "F: mapper\u00d7linear-func block [FFT conv + scatter]": 0.06102243000013914, + "F: linear-func\u00d7linear-func block [BLAS]": 0.019332219999932933, + "Curvature matrix F [residual: mirror + diag-add]": 0.004671089999874256, + "Regularization matrix H": 0.0016499499999554246, + "F + H": 0.0008134300001074735, + "Reconstruction solve (BLAS)": 0.010040690000050746, + "Mapped reconstruction [numba+FFT]": 0.0035483700000440875, + "Model data + chi^2": 0.0035280499999771563, + "log det (F+H) [Cholesky]": 0.008806140000069717, + "log det H [Cholesky]": 0.007731979999971372, + "Regularization term s'Hs": 0.00030322000002342976, + "Log evidence (figure of merit)": 0.014850420000084342 + }, + "total_step_by_step": 7.715006150000001, + "curvature_matrix_f_total_s": 0.33430780999997295, + "curvature_matrix_f_split_note": "The four 'F: ...' / 'Curvature matrix F' rows sum to curvature_matrix_f_total_s, the raw un-split cost of the inversion.curvature_matrix step. The three block rows are direct measurements of the (uncached) per-block helpers in imaging_numba/sparse.py; the 'Curvature matrix F [residual: ...]' row is t(curvature_matrix) minus those three, i.e. the global mirror, the no-regularization diagonal add and assembly overhead, and it carries the combined noise of the four timings. PyAutoArray#505 step 0.", + "direct_log_likelihood_function_per_call": 7.479174180000018, + "warmup_incl_numba_compile_s": 11.205480999999963, + "log_likelihood": 27180.70471569685, + "pinned_expected": 27180.704715698186, + "pinned_drift": [] +} \ No newline at end of file diff --git a/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1_rtu.png b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1_rtu.png new file mode 100644 index 000000000..7e42d15f9 Binary files /dev/null and b/results/breakdown/imaging/pixelization_numba_breakdown_hst_v2026.8.17.1_rtu.png differ diff --git a/results/notes/numba_curvature_matrix_f_split.md b/results/notes/numba_curvature_matrix_f_split.md new file mode 100644 index 000000000..4c79c5f6c --- /dev/null +++ b/results/notes/numba_curvature_matrix_f_split.md @@ -0,0 +1,249 @@ +# Numba CPU curvature matrix F — sub-block split (PyAutoArray#505) + +Step 0 (the baseline below) measured 2026-08-28 on the local WSL host, `OMP_NUM_THREADS=1`, +`AUTOARRAY_NUMBA_OPERATED_MEMO=0`, PyAutoArray branch +`feature/numba-hst-curvature-matrix-speedup`, autolens `v2026.8.17.1`, +`n_repeats = 10`. + +Cells (all four re-run from scratch, not hand-copied): + +``` +python scripts/imaging/likelihood_breakdown/pixelization_numba.py --instrument hst +python scripts/imaging/likelihood_breakdown/pixelization_numba.py --instrument euclid +python scripts/imaging/likelihood_breakdown/pixelization_numba.py --instrument hst --rect-mesh rtu +python scripts/imaging/likelihood_breakdown/delaunay_numba.py --instrument hst +``` + +## How F is split (and why the F row is a residual) + +`InversionImagingSparseNumba.curvature_matrix` assembles F from three blocks — +now three separately callable private helpers in +`autoarray/inversion/inversion/imaging_numba/sparse.py`: + +| block | helper | kernel | +|---|---|---| +| mapper x mapper | `_curvature_matrix_mapper_diag` | numba sparse-operator (w-tilde) contraction | +| mapper x linear-func | `_curvature_matrix_mapper_func_blocks_from` | dense sliding-window correlation over `ny x nx x ky x kx x 60` | +| linear-func x linear-func | `_curvature_matrix_func_func_blocks_from` | BLAS `dot` | + +followed by a global mirror and the no-regularization diagonal add. + +The breakdown harness times steps as the **incremental cost of touching the +next lazy attribute**. The three helpers are plain (uncached) methods, so +calling them does *not* prime the `curvature_matrix` cached property: touching +`curvature_matrix` afterwards recomputes all three blocks and then mirrors and +adds the diagonal. + +Rather than let that double-count (which would inflate `total_step_by_step` by +~2x F and break comparability with pre-instrumentation artifacts), the F row is +reported as a **residual**: + +``` +F residual = t(inversion.curvature_matrix) - (t_mapper_mapper + t_mapper_func + t_func_func) +``` + +so the four F rows sum to exactly the un-split `curvature_matrix` step — which +each result JSON also records directly as `curvature_matrix_f_total_s`. The +residual is the mirror + diagonal add + assembly overhead, estimated by +subtracting the three isolated block timings from the composite. It is a +difference of averages and therefore carries the noise of all four +measurements; at the ~1e-2 s level it can come out slightly negative (the +recompute inside the cached property runs on warmer caches than the isolated +first touch). It is recorded as measured, never clipped. + +## The split (seconds per evaluation) + +| cell | direct eval | F total | mapper x mapper | mapper x linear-func | l-func x l-func | F residual | +|---|---|---|---|---|---|---| +| hst, rectangular bilinear | 1.738 | 1.275 | 0.316 | **0.953** | 0.0222 | -0.0156 | +| euclid, rectangular bilinear | 0.444 | 0.284 | 0.0633 | **0.198** | 0.00447 | 0.0181 | +| hst, rectangular RTU | 8.501 | 1.250 | 0.304 | **0.929** | 0.0222 | -0.00511 | +| hst, Delaunay-1250 | 1.455 | 1.055 | 0.130 | **0.899** | 0.0214 | 0.00432 | + +Next two largest non-F steps: + +| cell | 2nd | 3rd | +|---|---|---| +| hst bilinear | MGE operated mapping matrix 0.260 | inversion build 0.0303 | +| euclid bilinear | MGE operated mapping matrix 0.0949 | inversion build 0.0171 | +| hst RTU | mapper sparse triplets **7.88** | MGE operated mapping matrix 0.259 | +| hst Delaunay-1250 | MGE operated mapping matrix 0.235 | regularization matrix H (ConstantSplit) 0.0754 | + +## Verdict (the step-0 checkpoint) + +**The dense mapper x linear-func convolution dominates F on every cell** — 75 % +of F at hst bilinear, 70 % at euclid, 74 % at hst RTU, 85 % on Delaunay-1250. +The mapper x mapper sparse-operator block, which the symmetry work already +halved, is second at 10-25 %; the BLAS linear-func block and the mirror are +noise. The FFT lever (issue step 2 — route the 60 curvature-weight columns +through the existing batched `Convolver` with the flipped kernel) is therefore +the right phase-1 target, and it is the *only* term large enough to reach the +2x goal on its own. + +Note the block does **not** scale with the source mesh: 0.90-0.95 s at hst +whether the source is a 784-cell rectangular mesh or a 1250-vertex Delaunay, +and it tracks the image-pixel count instead (0.198 s at euclid's 3841 masked +pixels vs 0.95 s at hst's 15361). That is the signature of the dense native-grid +expansion, not of the mapper contraction. + +## Two things the re-baseline surfaced + +1. **hst rectangular RTU is not a 1.3 s cell — it is an 8.5 s cell.** The + "mapper sparse triplets" step costs **7.88 s** on the RTU (kernel-CDF) + adaptive rectangular family, against 0.006 s on Bilinear and 0.019 s on + Delaunay. RTU is GPU-only by the 2026-08-28 decision and out of scope for + this issue, but the committed `_rtu` artifact now records the cost. +2. **The Delaunay-1250 cell is much cheaper than the issue's opening table** + (1.455 s here vs 3.22 s): the reconstruction solve is 0.055 s (was 0.54 s) + and the inversion build 0.030 s (was ~0.5 s), i.e. the NNLS warm-start memo + and PyAutoArray#462 landed. The hst rectangular cell reads *higher* than the + quoted 1.28 s (1.738 s here, F 1.275 s vs 0.997 s) with every numba step + scaled up by a similar ~30 %, which is host/session variance rather than a + regression — the block *proportions*, which is what step 0 exists to + establish, are unaffected. + +Pinned log-likelihood checks (rtol 1e-6): hst bilinear **PASSED** +(27661.910133664103), hst RTU **PASSED** (27180.704715696862), hst Delaunay +**PASSED** (29090.52721044813). euclid has no pinned value and is skipped by +design; this run measured 6213.306873885871. + + +--- + +# Steps 1-2: the result (PyAutoArray#505) + +Measured 2026-08-28, same host and settings, `n_repeats = 10`, PyAutoArray +`feature/numba-hst-curvature-matrix-speedup` at the step-2 commit. + +## What changed in the library + +**Step 1 — three redundant passes over F, none of which changed a value:** +the global `curvature_matrix_mirrored_from` (every block was already symmetric +or had a known transpose, so the two off-diagonal writers now place the +transpose themselves); the `np.array(...)` copies of the three +`mapper.unique_mappings` arrays; and the per-mapper re-derivation and second +copy of `operated_mapping_matrix / noise_map ** 2`. Verified bit-identical: +`np.array_equal` on F, `True` on both euclid and hst. + +**Step 2 — the FFT lever.** The mapper x linear-func block's dense sliding +window is a *correlation* with the PSF, which is exactly a convolution with the +PSF reversed along both axes. It now runs through the existing batched +`Convolver` (new cached `Convolver.reversed_kernel`), once per linear func +rather than once per (mapper, linear func) pair, and only the sparse scatter +onto source pixels stays in numba +(`curvature_matrix_off_diags_via_mapper_and_blurred_curvature_weights_from`). +The dense kernel is kept as the reference the FFT path is asserted against in +the unit tests, with asymmetric non-square PSFs so a missing reversal fails. + +## Before / after (seconds per evaluation) + +The step-0 table above and this one were measured in different sessions, and +this host carries ~20-30 % session-to-session variance, so the before column +here is a **fresh re-measurement of the step-0 commit taken back-to-back with +the after run**, not the step-0 table. (The step-0 numbers for the same cells +were 1.738 / 0.444 / 1.455 s.) + +| cell | eval | F total | mapper x mapper | mapper x l-func | l-func x l-func | +|---|---|---|---|---|---| +| hst, rectangular bilinear | 1.562 -> **0.595** | 1.195 -> **0.359** | 0.295 -> 0.277 | 0.858 -> **0.054** | 0.0209 -> 0.0215 | +| euclid, rectangular bilinear | 0.349 -> **0.249** | 0.256 -> **0.097** | 0.060 -> 0.065 | 0.182 -> **0.023** | 0.0043 -> 0.0045 | +| hst, Delaunay-1250 | 1.367 -> **0.758** | 1.077 -> **0.184** | 0.122 -> 0.123 | 0.854 -> **0.052** | 0.0215 -> 0.0192 | +| hst, rectangular RTU | (step-0: 8.501) -> 7.479 | (1.250) -> **0.334** | (0.304) -> 0.249 | (0.929) -> **0.061** | 0.0222 -> 0.0193 | + +RTU has no same-session before column: it is an 8.5 s cell dominated by the +7.1 s "mapper sparse triplets" step and is GPU-only by the 2026-08-28 decision, +so it was re-run once for currency rather than paired. + +Speed-ups: **~16x on the mapper x linear-func block**, **3.3x on F** (5.9x on +Delaunay, where F was 74 % of the evaluation), and **2.6x on the whole HST +evaluation**. The 2x goal for the issue is met on the HST rectangular and +Delaunay cells. + +## Where the time went + +F is no longer the dominant term at HST resolution. After the change the +largest steps on hst bilinear are the mapper x mapper sparse-operator block +(0.277 s) and the MGE operated mapping matrix (0.224 s); the mapper x +linear-func block has fallen from 72 % of F to 15 %. The mapper x mapper block +is now the phase-2 candidate. + +## Correctness + +F agrees with the sliding-window result to **3e-18 relative** on both euclid +and hst (the FFT is not bit-identical to the direct sum, as expected). Pinned +log-likelihood checks **PASSED** on all three pinned cells: hst bilinear +27661.91013366411 (pinned 27661.910133665442), hst RTU 27180.70471569685 +(pinned 27180.704715698186), hst Delaunay 29090.527210448134 (pinned +29090.527192092646). euclid, which has no pin, measured 6213.306873885871 — +unchanged to every recorded digit. + +## Harness change + +The `F: mapper x linear-func block` step label was `[dense conv]` and is now +`[FFT conv + scatter]`, since that is what it now times. Nothing else about the +step list, the residual design or the pins changed. + +## Pool run (multiprocessing oversubscription check) + +The harness measures one process at `OMP_NUM_THREADS=1`. Nautilus fits run one +process per core, so a single-thread win only counts if it survives the real +pool — and an FFT that quietly spins up its own threads would show up as a pool +regression even with the microbenchmark improving. This section is that check. + +**Setup.** `autolens_workspace/scripts/imaging/features/pixelization/cpu_fast_modeling.py`, +first (non-SLaM) fit, run from the workspace CWD on an 8-core host, once against +canonical `PyAutoArray` `main` (caabe2d4) and once with `PYTHONPATH` shadowing +the task worktree; `autoarray.__file__` was asserted on both. `number_of_cores` +was raised 2 -> 8. Two deliberate departures from the smoke profile, both +forced: + +- `PYAUTO_TEST_MODE=1`, not the smoke default `2`. Level 2 bypasses the sampler + altogether, so the smoke profile as written runs **no pool at all**. Level 1 + sets Nautilus `n_like_max = 1`, which runs exactly one exploration batch: + 100 likelihood evaluations, so per-evaluation time is wall/100. +- `PYAUTO_SMALL_DATASETS` left unset. Under the 15x15 cap the fit sees 256 + masked image-pixels and the curvature matrix is too small to time; unset it is + 2828, the simulator's full resolution. + +Everything else is the smoke default (`PYAUTO_SKIP_FIT_OUTPUT/VISUALIZATION/CHECKS=1`, +`PYAUTO_DISABLE_JAX=1`). The shell profile already exports +`OMP_NUM_THREADS=MKL_NUM_THREADS=OPENBLAS_NUM_THREADS=1`; that was left as-is, +since it is what a real user on this machine runs. + +**Config A — the script as written.** Its lens is mass + shear with no light, +so `linear_obj_list` holds the mapper alone and the block this task moved to the +FFT does no work. As expected, nothing moves (s/eval, pool of 8, three runs): + +| | run 1 | run 2 | run 3 | median | +|---|---|---|---|---| +| main | 0.0756 | 0.0625 | 0.0610 | 0.0625 | +| branch | 0.0677 | 0.0682 | 0.0628 | 0.0677 | + +**Config B — the same fit plus linear light.** A 60-component linear MGE bulge +(the `features/multi_gaussian_expansion/modeling.py` recipe: 30 Gaussians x 2 +bases) added to the lens, so the mapper x linear-func block is non-empty. This +is the configuration the change actually touches: + +| | run 1 | run 2 | run 3 | median | +|---|---|---|---|---| +| main, pool of 8 | 0.1706 | 0.2124 | 0.1919 | 0.1919 | +| branch, pool of 8 | 0.1601 | 0.1747 | 0.1767 | 0.1747 | +| main, serial (`number_of_cores=1`) | 0.4845 | | | 0.4845 | +| branch, serial (`number_of_cores=1`) | 0.4489 | | | 0.4489 | + +**Verdict — no oversubscription.** The pool improves by 9 % and the single +process by 7 %: the pool gain tracks the single-thread gain rather than eroding +it. The parallel speed-up ratio is flat across the change — 0.4845/0.1919 = +**2.52x** on 8 cores before, 0.4489/0.1747 = **2.57x** after — which is the +number that would drop if the FFT had introduced hidden threads. (That ~2.5x on +8 cores is Nautilus's own batching and serialisation overhead; it is identical +before and after and is not something this task touched.) + +This matches the code: `Convolver`'s FFT path uses `np.fft.rfft2`, which has no +`workers=` parameter and is single-threaded; `scipy.fft` appears only as +`next_fast_len`, a shape calculation, not a transform. + +**Read this as a regression check, not a speed-up measurement.** The workspace +dataset is a 2828-pixel 0.1"/pixel simulation with a small rectangular mesh, so +F is a much smaller share of the evaluation than in the HST harness cells and +the end-to-end gain is correspondingly smaller than the 2.6x measured there. diff --git a/scripts/imaging/likelihood_breakdown/delaunay_numba.py b/scripts/imaging/likelihood_breakdown/delaunay_numba.py index 0e89ea3e3..83cfa93c0 100644 --- a/scripts/imaging/likelihood_breakdown/delaunay_numba.py +++ b/scripts/imaging/likelihood_breakdown/delaunay_numba.py @@ -203,6 +203,62 @@ def _profiling_root() -> _Path: # Per-step decomposition via sequential cached-property access # =================================================================== +# ------------------------------------------------------------------- +# Curvature matrix F sub-block instrumentation (PyAutoArray#505 step 0) +# ------------------------------------------------------------------- +# +# F is assembled from three blocks (see +# ``autoarray/inversion/inversion/imaging_numba/sparse.py``): +# +# 1. mapper x mapper ``_curvature_matrix_mapper_diag`` [sparse-op numba kernel] +# 2. mapper x linear-func ``_curvature_matrix_mapper_func_blocks_from`` [batched FFT conv + numba scatter] +# 3. linear-func x l-func ``_curvature_matrix_func_func_blocks_from`` [BLAS dot] +# +# and then, in the ``curvature_matrix`` cached property, a global mirror plus +# (when linear funcs are present) the no-regularization diagonal add. +# +# The three helpers are plain (uncached) methods, so touching them here does not +# prime the cached property: the F step that follows recomputes all three and +# then mirrors + adds the diagonal. The F row is therefore reported as a +# RESIDUAL, +# +# F residual = t(curvature_matrix) - (t_block_1 + t_block_2 + t_block_3) +# +# using the three measured block costs as the estimate of the recompute inside +# the cached property. This is the design that stays truthful *and* keeps the +# artifact comparable with pre-instrumentation runs: the four F rows sum to +# exactly the un-instrumented ``curvature_matrix`` step, so "TOTAL +# (step-by-step)" and the coverage cross-check are unchanged in meaning. The raw +# (unsplit) F total is written to the result JSON as +# ``curvature_matrix_f_total_s``. +# +# Caveat: the residual is a difference of averaged timings, so at the 1e-4 s +# level it carries the noise of all four measurements and can in principle come +# out slightly negative. It is recorded as measured, never clipped. + +F_MAPPER_MAPPER_LABEL = "F: mapper×mapper block [sparse-op]" +F_MAPPER_FUNC_LABEL = "F: mapper×linear-func block [FFT conv + scatter]" +F_FUNC_FUNC_LABEL = "F: linear-func×linear-func block [BLAS]" +F_RESIDUAL_LABEL = "Curvature matrix F [residual: mirror + diag-add]" + +_f_scratch: dict[int, np.ndarray] = {} + + +def _f_block_scratch(inversion) -> np.ndarray: + """Reusable (P, P) buffer the timed F sub-block helpers write into. + + Reused across repeats so each timing measures the block itself rather than a + fresh multi-MB allocation. Both helpers *assign* their block (they never + accumulate into it), so a dirty buffer cannot change what is measured. + """ + total_params = inversion.total_params + scratch = _f_scratch.get(total_params) + if scratch is None: + scratch = np.zeros((total_params, total_params)) + _f_scratch[total_params] = scratch + return scratch + + STEP_ACCESSORS = [ ("FitImaging construct", None), # handled specially (constructor) ("Blurred image (FFT convolve)", lambda fit: fit.blurred_image), @@ -225,7 +281,23 @@ def _profiling_root() -> _Path: ], ), ("Data vector D [numba]", lambda fit: fit.inversion.data_vector), - ("Curvature matrix F [numba sparse-op]", lambda fit: fit.inversion.curvature_matrix), + ( + F_MAPPER_MAPPER_LABEL, + lambda fit: fit.inversion._curvature_matrix_mapper_diag, + ), + ( + F_MAPPER_FUNC_LABEL, + lambda fit: fit.inversion._curvature_matrix_mapper_func_blocks_from( + curvature_matrix=_f_block_scratch(fit.inversion) + ), + ), + ( + F_FUNC_FUNC_LABEL, + lambda fit: fit.inversion._curvature_matrix_func_func_blocks_from( + curvature_matrix=_f_block_scratch(fit.inversion) + ), + ), + (F_RESIDUAL_LABEL, lambda fit: fit.inversion.curvature_matrix), ("Regularization matrix H (ConstantSplit)", lambda fit: fit.inversion.regularization_matrix), ("F + H", lambda fit: fit.inversion.curvature_reg_matrix), ("Reconstruction solve (BLAS)", lambda fit: fit.inversion.reconstruction), @@ -293,6 +365,21 @@ def one_decomposed_evaluation() -> tuple[dict[str, float], float]: likelihood_steps = [(label, accumulated[label] / n_repeats) for label, _ in STEP_ACCESSORS] +# Convert the raw F step into the residual (mirror + diag-add): see the +# "Curvature matrix F sub-block instrumentation" note above. The four F rows +# then sum to the raw, un-split F cost recorded here. +_step_dict = dict(likelihood_steps) +curvature_matrix_f_total = _step_dict[F_RESIDUAL_LABEL] +_f_block_total = ( + _step_dict[F_MAPPER_MAPPER_LABEL] + + _step_dict[F_MAPPER_FUNC_LABEL] + + _step_dict[F_FUNC_FUNC_LABEL] +) +likelihood_steps = [ + (label, curvature_matrix_f_total - _f_block_total if label == F_RESIDUAL_LABEL else per_call) + for label, per_call in likelihood_steps +] + start = time.perf_counter() for _ in range(n_repeats): log_likelihood_direct = analysis.log_likelihood_function(instance=instance) @@ -345,6 +432,17 @@ def one_decomposed_evaluation() -> tuple[dict[str, float], float]: }, "steps": {label: per_call for label, per_call in likelihood_steps}, "total_step_by_step": step_total, + "curvature_matrix_f_total_s": curvature_matrix_f_total, + "curvature_matrix_f_split_note": ( + "The four 'F: ...' / 'Curvature matrix F' rows sum to " + "curvature_matrix_f_total_s, the raw un-split cost of the " + "inversion.curvature_matrix step. The three block rows are direct " + "measurements of the (uncached) per-block helpers in " + "imaging_numba/sparse.py; the 'Curvature matrix F [residual: ...]' row " + "is t(curvature_matrix) minus those three, i.e. the global mirror, the " + "no-regularization diagonal add and assembly overhead, and it carries " + "the combined noise of the four timings. PyAutoArray#505 step 0." + ), "direct_log_likelihood_function_per_call": direct_per_call, "warmup_incl_numba_compile_s": warmup_s, "log_likelihood": float(log_likelihood_direct), @@ -363,7 +461,7 @@ def one_decomposed_evaluation() -> tuple[dict[str, float], float]: labels = [label for label, _ in likelihood_steps] times = [per_call for _, per_call in likelihood_steps] -fig, ax = plt.subplots(figsize=(10, 6.5)) +fig, ax = plt.subplots(figsize=(10, 7.8)) y_pos = range(len(labels)) bars = ax.barh(y_pos, times, color="#4C72B0", edgecolor="white", height=0.6) diff --git a/scripts/imaging/likelihood_breakdown/pixelization_numba.py b/scripts/imaging/likelihood_breakdown/pixelization_numba.py index bc354be9e..38bf96684 100644 --- a/scripts/imaging/likelihood_breakdown/pixelization_numba.py +++ b/scripts/imaging/likelihood_breakdown/pixelization_numba.py @@ -23,7 +23,13 @@ 7. Mapper sparse triplets — the sparse [data -> source-pixel] mapping weights (cached, reused by data vector + curvature) 8. Data vector D [numba] -9. Curvature matrix F (sparse operator) [numba] +9. Curvature matrix F (sparse operator), split into its three blocks plus the + mirror + diagonal-add residual — see the "Curvature matrix F sub-block + instrumentation" note beside ``STEP_ACCESSORS``: + 9a. F: mapper x mapper block [numba sparse-op kernel] + 9b. F: mapper x linear-func block [batched FFT convolution + numba scatter] + 9c. F: linear-func x linear-func block [BLAS] + 9d. F residual: mirror + diag-add 10. Regularization matrix H 11. F + H 12. Reconstruction solve (BLAS) @@ -208,6 +214,62 @@ def _profiling_root() -> _Path: # Per-step decomposition via sequential cached-property access # =================================================================== +# ------------------------------------------------------------------- +# Curvature matrix F sub-block instrumentation (PyAutoArray#505 step 0) +# ------------------------------------------------------------------- +# +# F is assembled from three blocks (see +# ``autoarray/inversion/inversion/imaging_numba/sparse.py``): +# +# 1. mapper x mapper ``_curvature_matrix_mapper_diag`` [sparse-op numba kernel] +# 2. mapper x linear-func ``_curvature_matrix_mapper_func_blocks_from`` [batched FFT conv + numba scatter] +# 3. linear-func x l-func ``_curvature_matrix_func_func_blocks_from`` [BLAS dot] +# +# and then, in the ``curvature_matrix`` cached property, a global mirror plus +# (when linear funcs are present) the no-regularization diagonal add. +# +# The three helpers are plain (uncached) methods, so touching them here does not +# prime the cached property: the F step that follows recomputes all three and +# then mirrors + adds the diagonal. The F row is therefore reported as a +# RESIDUAL, +# +# F residual = t(curvature_matrix) - (t_block_1 + t_block_2 + t_block_3) +# +# using the three measured block costs as the estimate of the recompute inside +# the cached property. This is the design that stays truthful *and* keeps the +# artifact comparable with pre-instrumentation runs: the four F rows sum to +# exactly the un-instrumented ``curvature_matrix`` step, so "TOTAL +# (step-by-step)" and the coverage cross-check are unchanged in meaning. The raw +# (unsplit) F total is written to the result JSON as +# ``curvature_matrix_f_total_s``. +# +# Caveat: the residual is a difference of averaged timings, so at the 1e-4 s +# level it carries the noise of all four measurements and can in principle come +# out slightly negative. It is recorded as measured, never clipped. + +F_MAPPER_MAPPER_LABEL = "F: mapper×mapper block [sparse-op]" +F_MAPPER_FUNC_LABEL = "F: mapper×linear-func block [FFT conv + scatter]" +F_FUNC_FUNC_LABEL = "F: linear-func×linear-func block [BLAS]" +F_RESIDUAL_LABEL = "Curvature matrix F [residual: mirror + diag-add]" + +_f_scratch: dict[int, np.ndarray] = {} + + +def _f_block_scratch(inversion) -> np.ndarray: + """Reusable (P, P) buffer the timed F sub-block helpers write into. + + Reused across repeats so each timing measures the block itself rather than a + fresh multi-MB allocation. Both helpers *assign* their block (they never + accumulate into it), so a dirty buffer cannot change what is measured. + """ + total_params = inversion.total_params + scratch = _f_scratch.get(total_params) + if scratch is None: + scratch = np.zeros((total_params, total_params)) + _f_scratch[total_params] = scratch + return scratch + + STEP_ACCESSORS = [ ("FitImaging construct", None), # handled specially (constructor) ("Blurred image (FFT convolve)", lambda fit: fit.blurred_image), @@ -227,7 +289,23 @@ def _profiling_root() -> _Path: ], ), ("Data vector D [numba]", lambda fit: fit.inversion.data_vector), - ("Curvature matrix F [numba sparse-op]", lambda fit: fit.inversion.curvature_matrix), + ( + F_MAPPER_MAPPER_LABEL, + lambda fit: fit.inversion._curvature_matrix_mapper_diag, + ), + ( + F_MAPPER_FUNC_LABEL, + lambda fit: fit.inversion._curvature_matrix_mapper_func_blocks_from( + curvature_matrix=_f_block_scratch(fit.inversion) + ), + ), + ( + F_FUNC_FUNC_LABEL, + lambda fit: fit.inversion._curvature_matrix_func_func_blocks_from( + curvature_matrix=_f_block_scratch(fit.inversion) + ), + ), + (F_RESIDUAL_LABEL, lambda fit: fit.inversion.curvature_matrix), ("Regularization matrix H", lambda fit: fit.inversion.regularization_matrix), ("F + H", lambda fit: fit.inversion.curvature_reg_matrix), ("Reconstruction solve (BLAS)", lambda fit: fit.inversion.reconstruction), @@ -296,6 +374,21 @@ def one_decomposed_evaluation() -> tuple[dict[str, float], float]: likelihood_steps = [(label, accumulated[label] / n_repeats) for label, _ in STEP_ACCESSORS] +# Convert the raw F step into the residual (mirror + diag-add): see the +# "Curvature matrix F sub-block instrumentation" note above. The four F rows +# then sum to the raw, un-split F cost recorded here. +_step_dict = dict(likelihood_steps) +curvature_matrix_f_total = _step_dict[F_RESIDUAL_LABEL] +_f_block_total = ( + _step_dict[F_MAPPER_MAPPER_LABEL] + + _step_dict[F_MAPPER_FUNC_LABEL] + + _step_dict[F_FUNC_FUNC_LABEL] +) +likelihood_steps = [ + (label, curvature_matrix_f_total - _f_block_total if label == F_RESIDUAL_LABEL else per_call) + for label, per_call in likelihood_steps +] + # Cross-check: a directly timed, undecomposed evaluation via the production # entry point. The step total should account for (nearly) all of it. start = time.perf_counter() @@ -349,6 +442,17 @@ def one_decomposed_evaluation() -> tuple[dict[str, float], float]: }, "steps": {label: per_call for label, per_call in likelihood_steps}, "total_step_by_step": step_total, + "curvature_matrix_f_total_s": curvature_matrix_f_total, + "curvature_matrix_f_split_note": ( + "The four 'F: ...' / 'Curvature matrix F' rows sum to " + "curvature_matrix_f_total_s, the raw un-split cost of the " + "inversion.curvature_matrix step. The three block rows are direct " + "measurements of the (uncached) per-block helpers in " + "imaging_numba/sparse.py; the 'Curvature matrix F [residual: ...]' row " + "is t(curvature_matrix) minus those three, i.e. the global mirror, the " + "no-regularization diagonal add and assembly overhead, and it carries " + "the combined noise of the four timings. PyAutoArray#505 step 0." + ), "direct_log_likelihood_function_per_call": direct_per_call, "warmup_incl_numba_compile_s": warmup_s, "log_likelihood": float(log_likelihood_direct), @@ -367,7 +471,7 @@ def one_decomposed_evaluation() -> tuple[dict[str, float], float]: labels = [label for label, _ in likelihood_steps] times = [per_call for _, per_call in likelihood_steps] -fig, ax = plt.subplots(figsize=(10, 6)) +fig, ax = plt.subplots(figsize=(10, 7.2)) y_pos = range(len(labels)) bars = ax.barh(y_pos, times, color="#4C72B0", edgecolor="white", height=0.6) diff --git a/scripts/misc/likelihood_breakdown/README.md b/scripts/misc/likelihood_breakdown/README.md index c67793231..c37b0e753 100644 --- a/scripts/misc/likelihood_breakdown/README.md +++ b/scripts/misc/likelihood_breakdown/README.md @@ -26,7 +26,7 @@ For *how long the likelihood actually takes* on production hardware — i.e. a s | `imaging/delaunay` | hst | hpc_a100_mp | dense (mapping) | 96.8 ms | v2026.7.6.649 | | `imaging/delaunay` | hst | hpc_a100_mp | sparse (w-tilde) | 95.5 ms | v2026.7.6.649 | | `imaging/delaunay_numba` | euclid | local_cpu_fp64 | sparse (numba) | 1.19 s | v2026.8.17.1 | -| `imaging/delaunay_numba` | hst | local_cpu_fp64 | sparse (numba) | 3.22 s | v2026.8.17.1 | +| `imaging/delaunay_numba` | hst | local_cpu_fp64 | sparse (numba) | 679.2 ms | v2026.8.17.1 | | `imaging/mge` | hst | local_cpu_fp64 | dense (mapping) | 179.5 ms | v2026.7.6.649 | | `imaging/mge` | hst | hpc_a100_fp64 | dense (mapping) | 7.8 ms | v2026.7.6.649 | | `imaging/pixelization` | hst | local_cpu_fp64 | dense (mapping) | 8.65 s | v2026.7.6.649 | @@ -35,8 +35,8 @@ For *how long the likelihood actually takes* on production hardware — i.e. a s | `imaging/pixelization` | hst | hpc_a100_fp64 | sparse (w-tilde) | 57.9 ms | v2026.7.6.649 | | `imaging/pixelization` | hst | hpc_a100_mp | dense (mapping) | 56.4 ms | v2026.7.6.649 | | `imaging/pixelization` | hst | hpc_a100_mp | sparse (w-tilde) | 55.5 ms | v2026.7.6.649 | -| `imaging/pixelization_numba` | euclid | local_cpu_fp64 | sparse (numba) | 2.10 s | v2026.8.17.1 | -| `imaging/pixelization_numba` | hst | local_cpu_fp64 | sparse (numba) | 21.57 s | v2026.8.17.1 | +| `imaging/pixelization_numba` | euclid | local_cpu_fp64 | sparse (numba) | 288.6 ms | v2026.8.17.1 | +| `imaging/pixelization_numba` | hst | local_cpu_fp64 | sparse (numba) | 691.5 ms | v2026.8.17.1 | Auto-generated by `scripts/build_readme.py` from the versioned artifacts under `results/breakdown/`.