Skip to content

[mlir][openacc] Model acc cache directive as data entry operands on acc.loop #65521

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

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

clementval
Copy link
Contributor

The cache directive may appear at the top of (inside of) a loop. It specifies array elements or subarrays that should be fetched into the highest level of the cache for the body of the loop.

The cache directive is modeled as a data entry operands attached to the acc.loop operation.

@clementval clementval requested review from a team as code owners September 6, 2023 19:50
@github-actions github-actions bot added mlir:core MLIR Core Infrastructure mlir flang Flang issues not falling into any other category labels Sep 6, 2023
Copy link
Contributor

@razvanlupusoru razvanlupusoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. However, can you please add the new ops to the ACC_DATA_ENTRY_OPS macro in OpenACC.h?

@clementval
Copy link
Contributor Author

Looks good to me. However, can you please add the new ops to the ACC_DATA_ENTRY_OPS macro in OpenACC.h?

Sure I'll add it.

@clementval
Copy link
Contributor Author

Looks good to me. However, can you please add the new ops to the ACC_DATA_ENTRY_OPS macro in OpenACC.h?

Done

Copy link
Contributor

@razvanlupusoru razvanlupusoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you!

@clementval clementval merged commit 996171a into llvm:main Sep 11, 2023
@clementval clementval deleted the acc_cache branch September 11, 2023 20:38
clementval added a commit that referenced this pull request Sep 11, 2023
The cache directive is attached directly to the acc.loop operation when
the directive appears in the loop. When it appears before a loop, the
OpenACCCacheConstruct is saved and attached when the acc.loop is
created.

Directive that cannot be attached to a loop are silently discarded. 

Depends on #65521
AntonRydahl pushed a commit to AntonRydahl/llvm-project that referenced this pull request Sep 11, 2023
…cc.loop (llvm#65521)

The `cache` directive may appear at the top of (inside of) a loop. It
specifies array elements or subarrays that should be fetched into the
highest level of the cache for the body of the loop.

The `cache` directive is modeled as a data entry operands attached to
the acc.loop operation.
AntonRydahl pushed a commit to AntonRydahl/llvm-project that referenced this pull request Sep 11, 2023
The cache directive is attached directly to the acc.loop operation when
the directive appears in the loop. When it appears before a loop, the
OpenACCCacheConstruct is saved and attached when the acc.loop is
created.

Directive that cannot be attached to a loop are silently discarded. 

Depends on llvm#65521
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
…cc.loop (llvm#65521)

The `cache` directive may appear at the top of (inside of) a loop. It
specifies array elements or subarrays that should be fetched into the
highest level of the cache for the body of the loop.

The `cache` directive is modeled as a data entry operands attached to
the acc.loop operation.
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
The cache directive is attached directly to the acc.loop operation when
the directive appears in the loop. When it appears before a loop, the
OpenACCCacheConstruct is saved and attached when the acc.loop is
created.

Directive that cannot be attached to a loop are silently discarded. 

Depends on llvm#65521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category mlir:core MLIR Core Infrastructure mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants