Skip to content

Conversation

@matt-graham
Copy link
Collaborator

Resolves #254

Updates benchmarks to record round-trip error for forward transforms - that is starting from a set of coefficients and computing a signal by performing inverse transform, computing maximum absolute difference of coefficients recovered using forward transform from signal compared to original reference coefficients.

Also updates benchmarking for JAX functions to use the static cost and memory analysis available for ahead of time compiled functions to get estimates of operation and memory costs, which should give estimates when running both on CPU and GPU, thus giving some way of tracking memory performance on GPU.

The benchmarks have also been updated to use the standard library tracemalloc module to try to trace memory usage when running on a CPU rather than the previous usage of the memory_profiler package which did give very reliable results. This only gives reasonable values for the NumPy methods (presumably as JAX's memory allocations are transparent to the tracemalloc module) but as we don't have the cost / memory analysis statistics for NumPy this is still useful.

@matt-graham matt-graham added the infrastructure Issues related to infrastructure for repository and project label Jan 23, 2025
@jasonmcewen
Copy link
Contributor

This is great @matt-graham! Can we record mean absolute error of harmonic coefficients as well as max absolute error.

@matt-graham
Copy link
Collaborator Author

@jasonmcewen thanks - I've now updated to also record the mean absolute error.

@matt-graham matt-graham merged commit 1081734 into main Feb 5, 2025
5 checks passed
@matt-graham matt-graham deleted the mmg/benchmarks-error-and-cost-analysis branch February 5, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Issues related to infrastructure for repository and project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record round-trip errors in benchmarks

3 participants