Repository navigation
benchmark: add a task-overhead suite (tasks) - #788
Open
AnnaLena77 wants to merge 4 commits into
Open
AnnaLena77 wants to merge 4 commits into
AnnaLena77 wants to merge 4 commits into
Conversation
The array/linalg/sparse/stencil suites measure tile compute and data movement. None isolates the runtime's own per-task cost, which is what limits latency-bound programs (many small tasks, short dependent phases) and, under MPI, what every rank pays for tasks it never runs. The new "tasks" suite times, with microsecond task bodies and explicit ExactScope placement: round-robin and single-owner pinned spawns, unscoped spawns, a cross-owner dependent chain (hop latency), a pairwise fan-in tree, and a multi-phase exchange step (local stages, one small array per owner pair, a final local stage). A rank-local variant is included when MPI processors refuse DistributedAcceleration tasks. wait() does not rethrow a failed task, so a benchmark whose tasks all fail would 'run' in microseconds. Every benchmark is therefore checked once at a tiny size with fetch() when the suite is built, and skipped with a warning when it does not produce the expected value. Opt-in via BENCHMARK=tasks:dagger (not added to the default set).
… tasks that may throw The single-owner benchmark runs on the first owner, i.e. on the process that records the timing, so it measures the owner. Add a variant pinned to the last owner, where the recording process only has to plan the tasks, and variants whose bodies cannot be proven not to throw (concrete return type, may error), which is what most real task bodies look like and which take a different path under MPI than the provably non-throwing noop.
…odies that may throw
This branch has not been deployed
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.
This adds a benchmark suite that measures the runtime's own per-task cost, which the existing array, linalg, sparse and stencil suites do not isolate. It only touches
benchmark/; no source file changes.The suite
taskstimes microsecond task bodies with explicitExactScopeplacement: round-robin and single-owner pinned spawns, unscoped spawns, a cross-owner dependent chain (hop latency), a pairwise fan-in tree and a multi-phase exchange step. Variants whose bodies may throw are included, since most real task bodies look like that and they take a different path under MPI than a provably non-throwing no-op. A rank-local variant is included for communicators of size one.wait()does not rethrow a failed task, so a benchmark whose tasks all fail would finish in microseconds. Every benchmark is therefore checked once at a tiny size withfetch()when the suite is built, and skipped with a warning if it does not produce the expected value.The suite is opt-in (
BENCHMARK=tasks:dagger) and is not added to the default set. I would like to have it upstream because the scheduler pull requests that follow quote their numbers from it.AI disclosure: I prepared this change with the help of Claude (Anthropic) and reviewed it myself.
🤖 Generated with Claude Code