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

[MLIR][OpenMP] Update translation of DISTRIBUTE PARALLEL DO to LLVM IR #137

Merged
merged 4 commits into from
Aug 13, 2024

Conversation

skatrak
Copy link

@skatrak skatrak commented Aug 7, 2024

@skatrak
Copy link
Author

skatrak commented Aug 12, 2024

Here's a simple application and the MLIR and LLVM IR produced for the host by the current version of ATD (pre.*) and by this PR stack (post.*) for reference: test.zip

This patch removes the `LoopWrapperInterface` from `omp.parallel` and updates
the semantics of the interface to make loop wrapper restrictions mandatory to
operations that have it, rather than a role they might optionally take.

MLIR operation verifiers are updated to expect the "hoisted omp.parallel"
representation for `distribute parallel do`, to be later implemented in place
of a loop wrapper `omp.parallel`.
This patch updates the Flang lowering process for `distribute parallel do` to
follow the "hoisted `omp.parallel`" representation. Now temporary allocations
produced while lowering the loop body reside inside of that operation instead
of the loop wrappers' parent region.

Special handling of `omp.parallel` with regards to alloca creation is removed,
as it's no longer necessary to make this distinction. Impacted Lit tests are
updated according to the new representation.
This patch makes changes to the `DoConcurrentConversion` pass to follow the
"hoisted omp.parallel" representation when converting `do concurrent`
constructs into `target teams distribute parallel do`.
This patch updates the LLVM IR translation pass to expect the new "hoisted
omp.parallel" representation for `distribute parallel do`.
@skatrak skatrak force-pushed the skatrak/dpd-03-doconcurrent branch from 97b9697 to 9a95922 Compare August 13, 2024 10:23
Base automatically changed from skatrak/dpd-03-doconcurrent to amd-trunk-dev August 13, 2024 10:27
@skatrak skatrak merged commit d878a91 into amd-trunk-dev Aug 13, 2024
2 of 4 checks passed
@skatrak skatrak deleted the skatrak/dpd-04-llvm branch August 13, 2024 10:28
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.

1 participant