This is an archive of the discontinued LLVM Phabricator instance.

[mlir][openacc] Add gang dim operand to acc.loop operation
ClosedPublic

Authored by clementval on Jun 1 2023, 10:45 PM.

Details

Summary

OpenACC 3.3 introduces a dim argument on the gang clause. This patch
adds a new operand for it on the acc.loop and update the custom
gang clause parser/printer for it.

Depends on D151970

Diff Detail

Event Timeline

clementval created this revision.Jun 1 2023, 10:45 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 1 2023, 10:45 PM
clementval requested review of this revision.Jun 1 2023, 10:45 PM
Anastasia added inline comments.Jun 4 2023, 1:02 PM
mlir/test/Dialect/OpenACC/ops.mlir
279

Since there are a number of restrictions on gang dim e.g. it can't appear together with num argument, should this be an invalid IR and some validations rules could catch and report this?

clementval added inline comments.Jun 4 2023, 5:23 PM
mlir/test/Dialect/OpenACC/ops.mlir
279

I’ll add check in the verifier.

address review comments

clang-format

jeanPerier accepted this revision.Jun 13 2023, 6:30 AM

Looks good

This revision is now accepted and ready to land.Jun 13 2023, 6:30 AM
razvanlupusoru accepted this revision.Jun 13 2023, 8:18 AM
razvanlupusoru added inline comments.
mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
803

I am feeling conflicted about this check because I don't understand why spec specifically restricts this case. To me it feels like something acc dialect should allow but not clause semantic verifier.

Remove num/dim check

clementval marked an inline comment as done.Jun 13 2023, 12:28 PM
clementval added inline comments.
mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
803

Remove here.

razvanlupusoru accepted this revision.Jun 13 2023, 1:30 PM
This revision was landed with ongoing or failed builds.Jun 13 2023, 1:39 PM
This revision was automatically updated to reflect the committed changes.
clementval marked an inline comment as done.