aboutsummaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
authorValentin Clement (バレンタイン クレメン) <clementval@gmail.com>2023-12-06 14:53:23 -0800
committerGitHub <noreply@github.com>2023-12-06 14:53:23 -0800
commitab212fc94c3da7273442db6bbdad4d5a94f0a515 (patch)
treea4010f97381d423d5a21b0d156b859faea8d49db /mlir
parentdcbb1968a8215e79bfc2bdc48a88d2596b7f5995 (diff)
downloadllvm-ab212fc94c3da7273442db6bbdad4d5a94f0a515.zip
llvm-ab212fc94c3da7273442db6bbdad4d5a94f0a515.tar.gz
llvm-ab212fc94c3da7273442db6bbdad4d5a94f0a515.tar.bz2
[mlir][openacc] Switch * to `star` which is more MLIR friendly (#74662)
`*` is not friendly to the MLIR attribute parser and will fail to be parsed. Switch the `*` enum representation to `star`.
Diffstat (limited to 'mlir')
-rw-r--r--mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td2
-rw-r--r--mlir/test/Dialect/OpenACC/ops.mlir4
2 files changed, 3 insertions, 3 deletions
diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
index 391e77e..9d48b1f 100644
--- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
@@ -156,7 +156,7 @@ def DeclareActionAttr : OpenACC_Attr<"DeclareAction", "declare_action"> {
}
// Device type enumeration.
-def OpenACC_DeviceTypeStar : I32EnumAttrCase<"Star", 0, "*">;
+def OpenACC_DeviceTypeStar : I32EnumAttrCase<"Star", 0, "star">;
def OpenACC_DeviceTypeDefault : I32EnumAttrCase<"Default", 1, "default">;
def OpenACC_DeviceTypeHost : I32EnumAttrCase<"Host", 2, "host">;
def OpenACC_DeviceTypeMulticore : I32EnumAttrCase<"Multicore", 3, "multicore">;
diff --git a/mlir/test/Dialect/OpenACC/ops.mlir b/mlir/test/Dialect/OpenACC/ops.mlir
index c06e5a5..05b0450 100644
--- a/mlir/test/Dialect/OpenACC/ops.mlir
+++ b/mlir/test/Dialect/OpenACC/ops.mlir
@@ -974,7 +974,7 @@ func.func @testupdateop(%a: memref<f32>, %b: memref<f32>, %c: memref<f32>) -> ()
acc.update async(%idxValue: index) dataOperands(%0: memref<f32>)
acc.update wait_devnum(%i64Value: i64) wait(%i32Value, %idxValue : i32, index) dataOperands(%0: memref<f32>)
acc.update if(%ifCond) dataOperands(%0: memref<f32>)
- acc.update dataOperands(%0: memref<f32>) attributes {acc.device_types = [#acc.device_type<nvidia>]}
+ acc.update dataOperands(%0: memref<f32>) attributes {acc.device_types = [#acc.device_type<star>]}
acc.update dataOperands(%0, %1, %2 : memref<f32>, memref<f32>, memref<f32>)
acc.update dataOperands(%0, %1, %2 : memref<f32>, memref<f32>, memref<f32>) attributes {async}
acc.update dataOperands(%0, %1, %2 : memref<f32>, memref<f32>, memref<f32>) attributes {wait}
@@ -993,7 +993,7 @@ func.func @testupdateop(%a: memref<f32>, %b: memref<f32>, %c: memref<f32>) -> ()
// CHECK: acc.update async([[IDXVALUE]] : index) dataOperands(%{{.*}} : memref<f32>)
// CHECK: acc.update wait_devnum([[I64VALUE]] : i64) wait([[I32VALUE]], [[IDXVALUE]] : i32, index) dataOperands(%{{.*}} : memref<f32>)
// CHECK: acc.update if([[IFCOND]]) dataOperands(%{{.*}} : memref<f32>)
-// CHECK: acc.update dataOperands(%{{.*}} : memref<f32>) attributes {acc.device_types = [#acc.device_type<nvidia>]}
+// CHECK: acc.update dataOperands(%{{.*}} : memref<f32>) attributes {acc.device_types = [#acc.device_type<star>]}
// CHECK: acc.update dataOperands(%{{.*}}, %{{.*}}, %{{.*}} : memref<f32>, memref<f32>, memref<f32>)
// CHECK: acc.update dataOperands(%{{.*}}, %{{.*}}, %{{.*}} : memref<f32>, memref<f32>, memref<f32>) attributes {async}
// CHECK: acc.update dataOperands(%{{.*}}, %{{.*}}, %{{.*}} : memref<f32>, memref<f32>, memref<f32>) attributes {wait}