[Mlir-commits] [mlir] [mlir][openacc][NFC] Add information about getters for operands with device_type (PR #80389)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Feb 1 21:17:24 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Valentin Clement (バレンタイン クレメン) (clementval)
<details>
<summary>Changes</summary>
Add information in the operation's description about which operands must be accessed with special getters for device_type support.
---
Full diff: https://github.com/llvm/llvm-project/pull/80389.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td (+34-1)
``````````diff
diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
index 9398cbfdacee4..af72fb6e2ac22 100644
--- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
@@ -900,6 +900,11 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
// parallel region
}
```
+
+ `async`, `wait`, `num_gangs`, `num_workers` and `vector_length` operands are
+ supported with `device_type` information. They should only be accessed by
+ the extra provided getters. If modified, the corresponding `device_type`
+ attributes must be modified as well.
}];
let arguments = (ins
@@ -1038,6 +1043,10 @@ def OpenACC_SerialOp : OpenACC_Op<"serial",
// serial region
}
```
+
+ `async` and `wait` operands are supported with `device_type` information.
+ They should only be accessed by the extra provided getters. If modified,
+ the corresponding `device_type` attributes must be modified as well.
}];
let arguments = (ins
@@ -1146,6 +1155,11 @@ def OpenACC_KernelsOp : OpenACC_Op<"kernels",
// kernels region
}
```
+
+ `collapse`, `gang`, `worker`, `vector`, `seq`, `independent`, `auto` and
+ `tile` operands are supported with `device_type` information. They should
+ only be accessed by the extra provided getters. If modified, the
+ corresponding `device_type` attributes must be modified as well.
}];
let arguments = (ins
@@ -1274,6 +1288,10 @@ def OpenACC_DataOp : OpenACC_Op<"data",
// data region
}
```
+
+ `async` and `wait` operands are supported with `device_type` information.
+ They should only be accessed by the extra provided getters. If modified,
+ the corresponding `device_type` attributes must be modified as well.
}];
@@ -1520,6 +1538,11 @@ def OpenACC_LoopOp : OpenACC_Op<"loop",
acc.yield
} attributes { collapse = [3] }
```
+
+ `collapse`, `gang`, `worker`, `vector`, `seq`, `independent`, `auto` and
+ `tile` operands are supported with `device_type` information. They should
+ only be accessed by the extra provided getters. If modified, the
+ corresponding `device_type` attributes must be modified as well.
}];
let arguments = (ins
@@ -2018,11 +2041,17 @@ def OpenACC_RoutineOp : OpenACC_Op<"routine", [IsolatedFromAbove]> {
Example:
```mlir
- func.func @acc_func(%a : i64) -> () attributes {acc.routine_info = #acc.routine_info<[@acc_func_rout1]>} {
+ func.func @acc_func(%a : i64) -> () attributes
+ {acc.routine_info = #acc.routine_info<[@acc_func_rout1]>} {
return
}
acc.routine @acc_func_rout1 func(@acc_func) gang
```
+
+ `bind`, `gang`, `worker`, `vector` and `seq` operands are supported with
+ `device_type` information. They should only be accessed by the extra
+ provided getters. If modified, the corresponding `device_type` attributes
+ must be modified as well.
}];
let arguments = (ins SymbolNameAttr:$sym_name,
@@ -2217,6 +2246,10 @@ def OpenACC_UpdateOp : OpenACC_Op<"update",
```mlir
acc.update device(%d1 : memref<10xf32>) attributes {async}
```
+
+ `async` and `wait` operands are supported with `device_type` information.
+ They should only be accessed by the extra provided getters. If modified,
+ the corresponding `device_type` attributes must be modified as well.
}];
let arguments = (ins Optional<I1>:$ifCond,
``````````
</details>
https://github.com/llvm/llvm-project/pull/80389
More information about the Mlir-commits
mailing list