Variadic<IntOrIndex>:$waitOperands,
UnitAttr:$async,
UnitAttr:$wait,
+ Variadic<IntOrIndex>:$deviceTypeOperands,
+ Optional<I1>:$ifCond,
Variadic<AnyType>:$hostOperands,
Variadic<AnyType>:$deviceOperands,
UnitAttr:$ifPresent);
let assemblyFormat = [{
+ ( `if` `(` $ifCond^ `)` )?
( `async` `(` $asyncOperand^ `:` type($asyncOperand) `)` )?
( `wait_devnum` `(` $waitDevnum^ `:` type($waitDevnum) `)` )?
+ ( `device_type` `(` $deviceTypeOperands^ `:`
+ type($deviceTypeOperands) `)` )?
( `wait` `(` $waitOperands^ `:` type($waitOperands) `)` )?
( `host` `(` $hostOperands^ `:` type($hostOperands) `)` )?
( `device` `(` $deviceOperands^ `:` type($deviceOperands) `)` )?
%i64Value = constant 1 : i64
%i32Value = constant 1 : i32
%idxValue = constant 1 : index
+ %ifCond = constant true
acc.update async(%i64Value: i64) host(%a: memref<10xf32>)
acc.update async(%i32Value: i32) host(%a: memref<10xf32>)
acc.update async(%idxValue: index) host(%a: memref<10xf32>)
acc.update wait_devnum(%i64Value: i64) wait(%i32Value, %idxValue : i32, index) host(%a: memref<10xf32>)
+ acc.update if(%ifCond) host(%a: memref<10xf32>)
+ acc.update device_type(%i32Value : i32) host(%a: memref<10xf32>)
acc.update host(%a: memref<10xf32>) device(%b, %c : memref<10xf32>, memref<10x10xf32>)
acc.update host(%a: memref<10xf32>) device(%b, %c : memref<10xf32>, memref<10x10xf32>) attributes {async}
acc.update host(%a: memref<10xf32>) device(%b, %c : memref<10xf32>, memref<10x10xf32>) attributes {wait}
// CHECK: [[I64VALUE:%.*]] = constant 1 : i64
// CHECK: [[I32VALUE:%.*]] = constant 1 : i32
// CHECK: [[IDXVALUE:%.*]] = constant 1 : index
+// CHECK: [[IFCOND:%.*]] = constant true
// CHECK: acc.update async([[I64VALUE]] : i64) host([[ARGA]] : memref<10xf32>)
// CHECK: acc.update async([[I32VALUE]] : i32) host([[ARGA]] : memref<10xf32>)
// CHECK: acc.update async([[IDXVALUE]] : index) host([[ARGA]] : memref<10xf32>)
// CHECK: acc.update wait_devnum([[I64VALUE]] : i64) wait([[I32VALUE]], [[IDXVALUE]] : i32, index) host([[ARGA]] : memref<10xf32>)
+// CHECK: acc.update if([[IFCOND]]) host([[ARGA]] : memref<10xf32>)
+// CHECK: acc.update device_type([[I32VALUE]] : i32) host([[ARGA]] : memref<10xf32>)
// CHECK: acc.update host([[ARGA]] : memref<10xf32>) device([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>)
// CHECK: acc.update host([[ARGA]] : memref<10xf32>) device([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) attributes {async}
// CHECK: acc.update host([[ARGA]] : memref<10xf32>) device([[ARGB]], [[ARGC]] : memref<10xf32>, memref<10x10xf32>) attributes {wait}