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

Support query by data attributes in UPIR DATA field #121

Open
ouankou opened this issue Jun 10, 2022 · 0 comments
Open

Support query by data attributes in UPIR DATA field #121

ouankou opened this issue Jun 10, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ouankou
Copy link
Contributor

ouankou commented Jun 10, 2022

Description

In our original design, the UPIR DATA field includes a list of data items and each data item represents a variable and its attributes, such as sharing, mapping, write/read, and so on. To find all the variables that are shared between threads, we have to iterate all data items and check corresponding attributes.
Normally there are not too many data items, so the brute force search won't bring much overhead. If we still want to improve the implementation, we can add serval new attributes like shared and private to SgUpirDataField. Then for example, the shared attribute will holds a list of data items that are shared.
When the SgUpirDataField is constructed, a new data item will be attached as usual, but also added to the corresponding list described above. Then it is easy to find certain types of data items and avoids the brute force search.

Example

e.g. Given #pragma omp parallel shared(a) private(b)
Variables a and b will attached as data items to a data field node named x. x->get_data() returns a list including both a and b. x->get_shared() returns a list only including a. x->get_private() returns a list only including b.

Implementation

For implementation, we need to add these new attributes to the ROSETTA where the UPIR DATA field is defined. In OpenMP/OpenACC to UPIR AST constructor, we need to add a new data item to multiple lists. Then in the transformation, the helpers for querying certain types of data items should be updated based on the new attributes.

@ouankou ouankou added the enhancement New feature or request label Jun 10, 2022
@ouankou ouankou self-assigned this Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant