From 1683a129dd7b6497a996a2ea24275a863d39bb58 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 28 Aug 2026 12:40:55 -0400 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20tutorial=208=20=E2=80=94=20numba=20?= =?UTF-8?q?remains=20the=20CPU=20route=20for=20pixelized=20sources=20(#506?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chapter 2 tutorial 8 said JAX supersedes `numba` outright. True for the light-profile likelihood, but not for pixelized-source modeling on a CPU, where the `numba` sparse-operator path is still faster on many-core machines. One sentence appended noting the exception and pointing at `autolens_workspace/scripts/imaging/features/pixelization/cpu_fast_modeling.py` and chapter 3. Prose only; no code or behaviour change. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XySQZP6Npj4adZMkYZ96Bo --- scripts/chapter_2_lens_modeling/tutorial_8_need_for_speed.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/chapter_2_lens_modeling/tutorial_8_need_for_speed.py b/scripts/chapter_2_lens_modeling/tutorial_8_need_for_speed.py index cd65a14..e326420 100755 --- a/scripts/chapter_2_lens_modeling/tutorial_8_need_for_speed.py +++ b/scripts/chapter_2_lens_modeling/tutorial_8_need_for_speed.py @@ -110,7 +110,10 @@ Long-time users may remember that **PyAutoLens** previously used `numba`, which recompiles individual Python functions into fast machine code. JAX supersedes it: rather than accelerating functions one at a time, it compiles -and optimizes the likelihood function end-to-end, and adds GPU support and batching on top. +and optimizes the likelihood function end-to-end, and adds GPU support and batching on top. The one exception is +pixelized-source modeling on a CPU, where the `numba` sparse-operator path (see +`autolens_workspace/scripts/imaging/features/pixelization/cpu_fast_modeling.py`, and chapter 3) remains the faster +route on many-core machines. Therefore, **PyAutoLens** is pretty well optimized and there are no 'low hanging fruit' speed ups available by writing the code in a different language. From 0083ea1bb0e8a9aa584a3d5f69f2c697aee81c4d Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 28 Aug 2026 12:43:25 -0400 Subject: [PATCH 2/2] docs: regenerate navigator catalogue for the tutorial 8 cross-ref (#506) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XySQZP6Npj4adZMkYZ96Bo --- workspace_index.json | 1 + 1 file changed, 1 insertion(+) diff --git a/workspace_index.json b/workspace_index.json index 7fd32f2..fcf37d2 100644 --- a/workspace_index.json +++ b/workspace_index.json @@ -373,6 +373,7 @@ "Wrap Up" ], "cross_refs": [ + "autolens_workspace/scripts/imaging/features/pixelization/cpu_fast_modeling.py", "chapter_optional/tutorial_searches.py" ], "notebook": "notebooks/chapter_2_lens_modeling/tutorial_8_need_for_speed.ipynb",