-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add implementation details information for task group dynamic dependencies #1743
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: dev/kboyarinov/tg-rfc-dynamic-dependencies-r2
Are you sure you want to change the base?
Add implementation details information for task group dynamic dependencies #1743
Conversation
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
…pendencies-r2' into dev/kboyarinov/tg-dynamic-dependencies-impl-rfc
…ps://github.com/oneapi-src/oneTBB into dev/kboyarinov/tg-dynamic-dependencies-impl-rfc
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
|
||
The stored reference counter is increased when: | ||
* `task_dynamic_state` associated with the task is created, the reference is reserved for the task object. | ||
* `task_tracker` instance for the task is created. |
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.
It is legal to have more than one task_tracker
for a task, I think the added "a" implies that there's not just one task_tracker
but that you increment the reference count whenever a task_tracker
is create. Although maybe it should be made more clear that multiple trackers are allowed for the same task.
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.
I have changed it to be "a" and mentioned explicitly that the instance can be a new tracker or a copy.
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
The stored reference counter is decreased when: | ||
* The associated task is completed, before destroying the task instance | ||
8000 * `task_tracker` instance associated with the task is destroyed | ||
* `task_dynamic_state` of the task that did `transfer_successors_to(new_task)` while executing is destroyed. In this case, the reference |
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.
Maybe its addressed later, but can two tasks transfer successors to the same new_task
? If so, "the" should be "a".
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.
Replaced with "a"
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
|
||
`m_task` is a pointer to the task, with which the current dynamic state is associated. | ||
|
||
`m_successors_list_head` is an atomic pointer to the head of the successor's list of the currently served task. It is also used |
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 9E12 a>.
I'm not sure about the phrase "currently served task". How about the "associated task"?
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.
Fixed
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
The stored reference counter is increased when: | ||
* `task_dynamic_state` associated with the task is created, the reference is reserved for the task object. | ||
* a `task_tracker` instance for the task is created (both non-empty tracker created from `task_handle` and copy of the existing one). | ||
* `transfer_successors_to(new_task)` is called, the dynamic state of the currently executing task reserves a reference on the |
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.
* F438 `transfer_successors_to(new_task)` is called, the dynamic state of the currently executing task reserves a reference on the | |
* `transfer_successors_to(new_task)` is called, the dynamic state of the associated task reserves a reference on the |
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.
I would keep currently executing
task here since in other places the task associated to the corresponding dynamic state was described. And here the dynamic state associated to the currently executing task (the task that called transfer_successors_to in the body).
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
When the task `pred1` completes execution, it traverses it's successors list and decreasing the reference counter stored in the vertex | ||
of `succ1` and `succ2`. | ||
|
||
When `pred2` traverse it's successors list, it decreases the reference counters in `succ1` and `succ2`. Both of them are equal to `0` now and hence |
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.
It's probably unimportant but you are assuming that pred1
completes first.
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.
Added an explicit mention
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com> Co-authored-by: Mike Voss <michaelj.voss@intel.com>
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
rfcs/proposed/task_group_dynamic_dependencies/implementation_details.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Description
Add RFC describing the implementation of task_group dynamic dependencies.
RFC can be found here: #1664
Implementation:
The document describes the complete implementation
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