Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devreal
Copy link
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 [email protected]

@therault
Copy link
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 <[email protected]>
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