Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions scripts/imaging/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,9 @@ def simulate(galaxies):
plotters call `numpy.asarray()` internally, so saving / plotting works
without manual conversion.

Two notes:

- Eager `simulator_jax.via_galaxies_from(galaxies, grid)` (no `@jax.jit`)
already runs on JAX and is sufficient for one-off simulations. The
`@jax.jit` wrap is only beneficial when you call the function many times.
- The `@jax.jit` wrap is currently blocked by a pre-existing `Array2D.native`
jit-incompatibility in autoarray's slim/native reshape. Eager JAX works
today; the `@jax.jit` shown above will work once a separate refactor
task lands.
Note: eager `simulator_jax.via_galaxies_from(galaxies, grid)` (no `@jax.jit`)
already runs on JAX and is sufficient for one-off simulations. The
`@jax.jit` wrap is only beneficial when you call the function many times.

See `scripts/guides/api/data_structures.py` for the broader "JIT-it-
yourself" pattern.
Expand Down
4 changes: 1 addition & 3 deletions scripts/interferometer/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ def simulate(galaxies):
`nufftax` replacement is a research path (see
`autolens_workspace_test/scripts/interferometer/nufft.py`).
- Eager `simulator_jax.via_image_from(image)` already runs on JAX without
the `@jax.jit` wrap; the JIT wrap is currently blocked by a pre-existing
`Array2D.native` autoarray limitation. Eager use works today; the
`@jax.jit` wrap shown above will work once a separate refactor lands.
the `@jax.jit` wrap; the JIT only matters for repeated calls.

See `scripts/guides/api/data_structures.py` for the broader "JIT-it-
yourself" pattern.
Expand Down
Loading