-
Notifications
You must be signed in to change notification settings - Fork 116
[oneTBB] Add a page with constraints helpers to the spec #650
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: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Isaev, Ilya <[email protected]>
93dbd8a
to
f819fc1
Compare
Signed-off-by: Isaev, Ilya <[email protected]>
@aleksei-fedotov @akukanov Please take a look. |
.. cpp:function:: std::vector<oneapi::tbb::task_arena> create_numa_task_arenas(oneapi::tbb::task_arena::constraints other_constraints = {}, unsigned reserved_slots = 0) | ||
|
||
Returns a ``std::vector`` of ``task_arena`` objects, each bound to a separate NUMA node. | ||
The number of created ``task_arena`` is equal to the number of NUMA nodes available on the system. |
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.
Shall it be less strict and, thus, more accurate?
The number of created ``task_arena`` is equal to the number of NUMA nodes available on the system. | |
The number of created ``task_arena`` is equal to the number of NUMA nodes detected on the system. |
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.
Should we require that this is the same set of nodes that is returned by tbb::info::numa_nodes()
?
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 think it is fair to require that as well, since the intent of this API is to provide shortcut to a common usage pattern of NUMA-constrained arenas.
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.
Updated the description
.. SPDX-License-Identifier: CC-BY-4.0 | ||
========================= | ||
Constrained Arena Helpers |
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.
Perhaps, task_arena Helpers might be more suitable as a name in case we would want to extend this page with other helpers, thus, avoiding creating a new one?
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
constrained_arena_helpers.rst |
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.
Instead of a separate page in auxiliary APIs, why not describe this as a non-member function for class task_arena
? There are already similar cases, e.g. tbb::finalize
and tbb::is_current_task_group_canceling
.
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.
Described it inside task_arena_cls
as a non-member function
.. cpp:function:: std::vector<oneapi::tbb::task_arena> create_numa_task_arenas(oneapi::tbb::task_arena::constraints other_constraints = {}, unsigned reserved_slots = 0) | ||
|
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.
As far as I can tell, the specification does not use oneapi::tbb
in the signatures of functions that are already in that namespace.
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.
Removed oneapi::tbb
.. note:: | ||
|
||
If error occurs during system topology parsing, returns ``std::vector`` containing single | ||
``task_arena`` object equivalent to ``task_arena(other_constraints, reserved_slots)``. |
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.
Since it speaks about a returned value, this does not seem to be a proper note. Notes are explanatory, while this sentence seems to be prescriptive.
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.
Removed . note::
.
Co-authored-by: Aleksei Fedotov <[email protected]>
Signed-off-by: Isaev, Ilya <[email protected]>
Signed-off-by: Isaev, Ilya <[email protected]>
Signed-off-by: Isaev, Ilya <[email protected]>
Add a page that describes helper APIs to simplify constrained arena creations. Currently it is a single function
oneapi::tbb::create_numa_task_arenas
from corresponding RFC.