Repository navigation
Adding synchronization and threading primitives - #3294
Merged
Merged
Conversation
benvanik
force-pushed
the
benvanik-task-primitives
branch
8 times, most recently
from
September 30, 2020 03:15
f044c9c to
d170a82
Compare
benvanik
force-pushed
the
benvanik-task-primitives
branch
from
September 30, 2020 03:39
d170a82 to
c92a1d5
Compare
benvanik
force-pushed
the
benvanik-task-primitives
branch
from
October 1, 2020 22:25
c92a1d5 to
42024b2
Compare
benvanik
force-pushed
the
benvanik-task-primitives
branch
4 times, most recently
from
October 1, 2020 23:26
acc06fd to
906e8fe
Compare
benvanik
marked this pull request as ready for review
October 1, 2020 23:30
benvanik
force-pushed
the
benvanik-task-primitives
branch
from
October 1, 2020 23:55
906e8fe to
326c4f1
Compare
6 tasks done
ScottTodd
approved these changes
Oct 2, 2020
Includes tracy instrumentation for iree_mutex_t. Benchmark results from my desktop: https://gist.github.com/benvanik/b9f601b173d18d17bdd1d3fc784d55de (this is using the futex iree_slim_mutex_t which is surprisingly close to the SRW-based iree_mutex_t, but since SRW is better I'm checking that in as the default)
This is the foundation of the task system thread pool and exposes functionality required for usage in that context. The surface is kept small to avoid needing large platform-dependent implementations.
benvanik
force-pushed
the
benvanik-task-primitives
branch
from
October 12, 2020 17:09
326c4f1 to
76b67c2
Compare
Merged
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.
These will be used to implement the task system used to execute CPU kernels. The mutex benchmarks show we are faster than std::mutex (due to some limitations we can accept) and we now have complete control over any cross-thread blocking behavior we want to introduce (to favor latency vs. power consumption, etc).
This is compatible with Windows, iOS/MacOS (following the Apple performance/power guidelines), Android/Linux, wasm/emscripten, and fallbacks for normal pthreads usage on other platforms. I've only optimized Windows right now but the other platforms shouldn't require much tweaking and when they do we have a benchmark to do it with.
Progress on #49.
Fixes #1482.