Skip to content

Conversation

@kboyarinov
Copy link
Contributor

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

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

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.
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants