Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bf7ba9b
fix: better init of spergel HLR
beckermr Jun 23, 2026
7ebdd85
pytest 8
beckermr Jun 23, 2026
33db36f
fix: get ci right for benchmarks
beckermr Jun 23, 2026
973eaf2
perf: smaller interval
beckermr Jun 24, 2026
90b5194
perf: use galsim to init on CPU if we can
beckermr Jun 24, 2026
5809fe9
fix: make sure we have debug symbols
beckermr Jun 24, 2026
9db82e7
perf: use interp for spergel in real-space
beckermr Jun 24, 2026
e58adb0
fix: remove debug statement
beckermr Jun 24, 2026
646dca7
fix: handle zero correctly
beckermr Jun 24, 2026
ba209a6
fix: use slow function
beckermr Jun 24, 2026
1f5e953
perf: try a mix of asymp, interp, and small-scale expansion
beckermr Jun 24, 2026
65db956
fix: same small nu function
beckermr Jun 24, 2026
65bb443
fix: match things smoothly
beckermr Jun 25, 2026
efd3f58
Apply suggestion from @beckermr
beckermr Jun 25, 2026
6ac2821
perf: see how slow this can be
beckermr Jun 25, 2026
895b698
Merge branch 'test-spergel' of https://github.com/GalSim-developers/J…
beckermr Jun 25, 2026
340a5cf
perf: tight starting bounds
beckermr Jun 25, 2026
c6837ca
Merge branch 'main' into test-spergel
beckermr Jul 7, 2026
ef1603d
Merge branch 'main' into test-spergel
beckermr Jul 7, 2026
b89fbe5
test: add test showing it is the FFT size for rendering
beckermr Jul 15, 2026
5c40786
fix: adjust test tolerance for mismatched FFT sizes
beckermr Jul 16, 2026
cc1ef81
fix: remove exact branch
beckermr Jul 16, 2026
944ad91
fix: remove changes not needed here
beckermr Jul 16, 2026
50f25b9
fix: add comments and cleanup code
beckermr Jul 16, 2026
9b75875
fix: address code review
beckermr Jul 17, 2026
74c16eb
test: add one test of the profile directly
beckermr Jul 17, 2026
1d2117c
perf: use log-log interp
beckermr Jul 17, 2026
db604d6
fix: negative flux is ok
beckermr Jul 17, 2026
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
8 changes: 8 additions & 0 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ jobs:
python -m pip install --upgrade pip
python -m pip install .[dev]

# the glibc debug symbols are needed by the benchmark tooling from codspeed
- name: Install glibc debug symbols
Comment thread
beckermr marked this conversation as resolved.
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y libc6-dbg

- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
Expand Down
38 changes: 0 additions & 38 deletions jax_galsim/core/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import re
import textwrap
from functools import partial
from typing import NamedTuple

import equinox
Expand Down Expand Up @@ -168,43 +167,6 @@ def ensure_hashable(v):
return _convert_to_numpy_nan(v)


@partial(jax.jit, static_argnames=("niter",))
def bisect_for_root(func, low, high, niter=75):
def _func(i, args):
func, low, flow, high, fhigh = args
mid = (low + high) / 2.0
fmid = func(mid)
return jax.lax.cond(
fmid * fhigh < 0,
lambda func, low, flow, mid, fmid, high, fhigh: (
func,
mid,
fmid,
high,
fhigh,
),
lambda func, low, flow, mid, fmid, high, fhigh: (
func,
low,
flow,
mid,
fmid,
),
func,
low,
flow,
mid,
fmid,
high,
fhigh,
)

flow = func(low)
fhigh = func(high)
args = (func, low, flow, high, fhigh)
return jax.lax.fori_loop(0, niter, _func, args, unroll=15)[-2]


# start of code from https://github.com/google/jax/blob/main/jax/_src/numpy/util.py #
# used with modifications for galsim under the following license:
# fmt: off
Expand Down
Loading