Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memoization scheme #25

Open
tlambert03 opened this issue May 7, 2024 · 0 comments
Open

Memoization scheme #25

tlambert03 opened this issue May 7, 2024 · 0 comments

Comments

@tlambert03
Copy link
Owner

As @fjug mentioned in #23 (comment)

It would be nice to cache/memoize expensive operations in general, such as generation of ground truth, PSFs, etc.

In some cases, where randomness is involved, this has to be done with care, and those functions should perhaps be unmemoizeable without providing a random seed. But for things like PSFs it's straightforward.

An additional complication is the numpy backend generalization: we don't want a numpy array returned if someone then switches to a Jax backend... so that needs to be part of the memo.

Since the objects can be large, global memory limits need to involved (this is particularly tricky if we're memoizing GPU-device objects... which probably
shouldn't be allowed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant