[Mlir-commits] [mlir] [acc] Add attribute for combined constructs (PR #80319)
Razvan Lupusoru
llvmlistbot at llvm.org
Wed Mar 6 14:11:23 PST 2024
================
@@ -1846,9 +1846,49 @@ func.func @acc_atomic_capture(%v: memref<i32>, %x: memref<i32>, %expr: i32) {
// -----
-%c2 = arith.constant 2 : i32
-%c1 = arith.constant 1 : i32
-acc.parallel num_gangs({%c2 : i32} [#acc.device_type<default>], {%c1 : i32, %c1 : i32, %c1 : i32} [#acc.device_type<nvidia>]) {
+// CHECK-LABEL: func.func @acc_num_gangs
+func.func @acc_num_gangs() {
+ %c2 = arith.constant 2 : i32
+ %c1 = arith.constant 1 : i32
+ acc.parallel num_gangs({%c2 : i32} [#acc.device_type<default>], {%c1 : i32, %c1 : i32, %c1 : i32} [#acc.device_type<nvidia>]) {
+ }
+
+ return
}
// CHECK: acc.parallel num_gangs({%c2{{.*}} : i32} [#acc.device_type<default>], {%c1{{.*}} : i32, %c1{{.*}} : i32, %c1{{.*}} : i32} [#acc.device_type<nvidia>])
+
+// -----
+
+// CHECK-LABEL: func.func @acc_combined
+func.func @acc_combined() {
+ acc.parallel combined(parallel loop) {
+ acc.loop combined(parallel loop) {
----------------
razvanlupusoru wrote:
I reduced the printing verbosity to match what we discussed here.
https://github.com/llvm/llvm-project/pull/80319
More information about the Mlir-commits
mailing list