Skip to content

Implement TT policies to control process mapping, priorities, and inlining#226

Open
devreal wants to merge 1 commit intoTESSEorg:masterfrom
devreal:policies2
Open

Implement TT policies to control process mapping, priorities, and inlining#226
devreal wants to merge 1 commit intoTESSEorg:masterfrom
devreal:policies2

Conversation

@devreal
Copy link
Copy Markdown
Contributor

@devreal devreal commented Mar 24, 2022

Policies replace explicit keymap and priomaps and can be directly inlined if so provided. They provide a wrapper around callables that map a key to an integer (rank, priority and the depth of inlining). They also provide extensibility in the future.

Users of ttg::make_tt can use ttg::make_policy to define policies with custom lambdas mapping keys to integers. Statically set policies cannot be changed at runtime, all defaulted policies can be set dynamically. Similarly, ttg::make_static_policy provides policies with statically defaulted mapping functions, which cannot be changed at runtime.

Users of ttg::TT can provide their own policy class that derives from TTPolicyBase to ensure forward compatibility. Policies are not virtual so custom policy classes simply override the base class symbols.

TT implementations derive from a TTPolicyWrapper class that provides all policy-relevant member functions (to ensure consistency and reduce code duplication).

@pnookala I used static policies in the streaming mrattg benchmark as a demo. Let me know if you're ok with that.

This change does not implement task inlining but provides the policy to control future implementations.

This PR supersedes #218 (too many conflicts after #217 and #223 were merged)

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

@therault
Copy link
Copy Markdown
Contributor

@devreal will resolve conflicts and ping the reviewers for new review

…ining

Policies replace keymap and priomaps and can be directly inlined if so
provided. Users of ttg::make_tt can use ttg::make_policy to define
policies with custom lambdas mapping keys to integers. Statically set
policies cannot be changed at runtime, all defaulted policies can be set.
Similarly, ttg::make_static_policy provides policies with statically
defaulted mapping functions, which cannot be changed at runtime.

This change does not implement task inlining but provides the policy to
control future implementations.

Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
@evaleev evaleev force-pushed the master branch 4 times, most recently from a2878ce to a49eb91 Compare November 24, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants