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

Cache improvements #455

Merged
merged 11 commits into from
Nov 13, 2023
Merged

Cache improvements #455

merged 11 commits into from
Nov 13, 2023

Conversation

jrmaddison
Copy link
Collaborator

  1. Values, provided by the replace_map when generating cache entries, are now included in the key.
  2. Updating the state of a value via var_update_state now clears associated cache entries.
  3. Validity of cache entries is checked every time before use with extra var_update_caches calls. This catches all cache invalidation visible to tlm_adjoint -- which with the Firedrake backend includes any updates to dat versions, even those that do not have associated var_update_state calls.

A better alternative to 3 is to make hashing cheap and then simply check the caches every time -- but this needs #183 in order to avoid leaking memory when applying checkpointing.

@jrmaddison jrmaddison force-pushed the jrmaddison/cache_updates branch 3 times, most recently from 0b75817 to e94f47c Compare November 9, 2023 12:34
@jrmaddison jrmaddison marked this pull request as ready for review November 10, 2023 10:43
@jrmaddison jrmaddison merged commit 78251df into main Nov 13, 2023
4 checks passed
@jrmaddison jrmaddison deleted the jrmaddison/cache_updates branch November 13, 2023 18:44
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

Successfully merging this pull request may close these issues.

None yet

1 participant