-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[OpenACC] add AutomaticAllocationScope to recipe ops #124337
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
[OpenACC] add AutomaticAllocationScope to recipe ops #124337
Conversation
@llvm/pr-subscribers-mlir @llvm/pr-subscribers-mlir-openacc Author: Scott Manley (rscottmanley) ChangesThe recipe operators should have AutomaticAllocationScope so recipes can be converted using operators that require parent ops to have AutomaticAllocationScope Full diff: https://github.com/llvm/llvm-project/pull/124337.diff 1 Files Affected:
diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
index c60eb5cc620a7d..7e9ed2c741cf76 100644
--- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
@@ -1008,8 +1008,9 @@ def OpenACC_UpdateHostOp : OpenACC_DataExitOpWithVarPtr<"update_host",
// 2.5.13 private clause
//===----------------------------------------------------------------------===//
-def OpenACC_PrivateRecipeOp : OpenACC_Op<"private.recipe",
- [IsolatedFromAbove, Symbol, RecipeInterface]> {
+def OpenACC_PrivateRecipeOp
+ : OpenACC_Op<"private.recipe", [IsolatedFromAbove, Symbol, RecipeInterface,
+ AutomaticAllocationScope]> {
let summary = "privatization recipe";
let description = [{
@@ -1065,8 +1066,10 @@ def OpenACC_PrivateRecipeOp : OpenACC_Op<"private.recipe",
// 2.5.14 firstprivate clause
//===----------------------------------------------------------------------===//
-def OpenACC_FirstprivateRecipeOp : OpenACC_Op<"firstprivate.recipe",
- [IsolatedFromAbove, Symbol, RecipeInterface]> {
+def OpenACC_FirstprivateRecipeOp
+ : OpenACC_Op<"firstprivate.recipe", [IsolatedFromAbove, Symbol,
+ RecipeInterface,
+ AutomaticAllocationScope]> {
let summary = "privatization recipe";
let description = [{
@@ -1131,8 +1134,10 @@ def OpenACC_FirstprivateRecipeOp : OpenACC_Op<"firstprivate.recipe",
// 2.5.15 reduction clause
//===----------------------------------------------------------------------===//
-def OpenACC_ReductionRecipeOp : OpenACC_Op<"reduction.recipe",
- [IsolatedFromAbove, Symbol, RecipeInterface]> {
+def OpenACC_ReductionRecipeOp
+ : OpenACC_Op<"reduction.recipe", [IsolatedFromAbove, Symbol,
+ RecipeInterface,
+ AutomaticAllocationScope]> {
let summary = "reduction recipe";
let description = [{
|
Can you please add a test to mlir/test/Dialect/OpenACC/ops.mlir ? |
The recipe operators should have AutomaticAllocationScope so recipes can be converted using operators that require parent ops to have AutomaticAllocationScope
baa6aa0
to
8705814
Compare
added, thanks for the review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
The recipe operators should have AutomaticAllocationScope so recipes can be converted using operators that require parent ops to have AutomaticAllocationScope