Skip to content

[WIP] Dynamic TT attributes#192

Closed
devreal wants to merge 2 commits into
TESSEorg:masterfrom
devreal:attributes_tuple_dynamic
Closed

[WIP] Dynamic TT attributes#192
devreal wants to merge 2 commits into
TESSEorg:masterfrom
devreal:attributes_tuple_dynamic

Conversation

@devreal

@devreal devreal commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

Implement a generic interface for attributes in TTs. An attribute may store either a value of specified type or a function mapping a task id to a value. Attributes may be set dynamically, i.e., the value and function can be changed at runtime. Setting a value or function overrides any previously set value or function.

Attributes availabe so far:

  • Process mapping (deprecates set_keymap)
  • Priority (deprecates set_priomap)
  • Final * (the task won't spawn any new tasks; not sure how useful this is)
  • Source * (the task has no predecessors; not sure how useful this is)
  • Immediate * (the task may be executed immediately; useful for operation with short runtimes)

(*) not yet implemented

We may want to add an attribute to denote pure tasks once we support them.

Attributes are set using

tt->set_attribute<ttg::Attribute::<ATTRIBUTE>>(<priority-value>)

or

tt->set_attribute<ttg::Attribute::<ATTRIBUTE>>([](const TaskId& id){ return <priority-value-of-id>; })

These attributes are currently defined for TTs. Should they be specific to an op, i.e., do we want different attributes for op and op_cuda?

Do we want attributes on a per-terminal basis? Which ones?

Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
…tibility

Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
@devreal

devreal commented Nov 8, 2021

Copy link
Copy Markdown
Contributor Author

Ideas for per-terminal attributes:

  • Reducer functions (if we want to treat them as such)
  • Whether reducers can be executed concurrently. The current use of streaming terminals in MRA is an example where the reducer can be executed in parallel, as each invocation sets a distinct entry in an array. This could alleviate some of the thread synchronization.

@devreal

devreal commented Feb 4, 2022

Copy link
Copy Markdown
Contributor Author

Discussion at the meeting Roanoke (2/4/2022): we can probably replace this with a policy-based design where the user overrides the default policy class and template the TT on it to allow the compiler to fully inline mapping functions.

@therault

Copy link
Copy Markdown
Contributor

Superseded by PR #226

@therault therault closed this Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants