-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Initial proposal for Task Aggregation #1927
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
base: master
Are you sure you want to change the base?
Conversation
| independent work sources that improve stealing scalability. | ||
|
|
||
| This model can also be interpreted as follows. Suppose the producer will generate *N* input items, where *N* is unknown in advance. | ||
| Execution with *aggregating-task-group* resembles buffering a batch of inputs, running an asynchronous parallel-for over the batch, then buffering again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "running an asynchronous parallel-for" here? I think this itself is open to interpretation. Do you mean "run" as if a task_group::run with a body that contains a tbb::parallel_for?
| auto work_item = get_work_item(); | ||
|
|
||
| while (work_item != end_of_work) { | ||
| tg.run(process(work_item)); // Can be executed by any worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary that the work are calls to the same function, i.e. "process(work_item)" or can the tasks be different?
| This document does not yet propose a concrete API. The following options can be considered: | ||
| 1. A separate ``task_group``-like API with the same member functions. | ||
| 2. Integration into ``tbb::task_group``, e.g., an additional ``run()`` overload with a policy parameter or a separate member function. | ||
| 3. A separate API (e.g., ``tbb::parallel_while(generator, predicate, body))``), equivalent to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really limits applicability to the same body across items.
Co-authored-by: Mike Voss <[email protected]>
Co-authored-by: Mike Voss <[email protected]>
Description
Add RFC with the initial description of Task Aggregation idea. The concrete API is an open question.
Fixes # - issue number(s) if exists
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
List users with
@to send notificationsOther information