ComputeGraph concurrency#5556
Draft
ffreyer wants to merge 20 commits into
Draft
Conversation
Collaborator
Benchmark ResultsSHA: 00d86f538712d0e3103667348f51136234abfc89 Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
91144d0 to
8eaa92a
Compare
not filtered in add_theme!() in compute_plots.jl
…stent tooltips, getindex of edge inputs in callback)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is another attempt at getting ComputeGraph updates and resolution working concurrently, without just placing everything behind a global lock.
This version includes locks for every edges which get locked behind a global lock before
resolve!()does work. The edge locks then release once the edges outputs are no longer in use by any child edge.mark_dirty!()locks the global lock asresolve!()preparation requires state to be frozen.mark_dirty!(computed)also locks the parent edge of the compute note it marks because it sets state used in edge resolution. Updates lock their parent edge for the same reason.update!()specifically lock the parent edge of all the inputs being set together, so the update remains synchronized.Notes:
Performance:
This is 10-20% slower than #5546 for me when rendering a simple plot in an Axis with the camera moving the Axis each frame.
TODO:
edge.dirty[] = truemultiple times. Updates still have edge locks to protect against overwrite.Type of change
Delete options that do not apply:
Checklist