[Mlir-commits] [mlir] [MLIR][AMDGPU] Add amdgpu.sched_barrier (PR #98911)

Manupa Karunaratne llvmlistbot at llvm.org
Tue Jul 16 05:48:54 PDT 2024


================
@@ -433,6 +433,46 @@ def AMDGPU_LDSBarrierOp : AMDGPU_Op<"lds_barrier"> {
   let assemblyFormat = "attr-dict";
 }
 
+def AMDGPU_SchedBarrierOpOpt : I32BitEnumAttr<"sched_barrier_opt_enum",
+    "The possible options for scheduling barriers",
+    [
+      I32BitEnumAttrCaseBit<"allow_none", 0>,
+      I32BitEnumAttrCaseBit<"allow_non_mem_non_sideffect", 1>,
+      I32BitEnumAttrCaseBit<"allow_valu", 2>,
+      I32BitEnumAttrCaseBit<"allow_salu", 3>,
+      I32BitEnumAttrCaseBit<"allow_mfma_wmma",  4>,
+      I32BitEnumAttrCaseBit<"allow_all_vmem",  5>,
+      I32BitEnumAttrCaseBit<"allow_vmem_read",  6>,
+      I32BitEnumAttrCaseBit<"allow_vmem_write", 7>,
+      I32BitEnumAttrCaseBit<"allow_all_ds", 8>,
+      I32BitEnumAttrCaseBit<"allow_ds_read", 9>,
+      I32BitEnumAttrCaseBit<"allow_ds_write", 10>,
+      I32BitEnumAttrCaseBit<"allow_transcendental", 11>
+    ]> {
+  let genSpecializedAttr = 0;
+  let cppNamespace = "::mlir::amdgpu";
+}
+
+def AMDGPU_SchedBarrierOpOptAttr : EnumAttr<AMDGPU_Dialect, AMDGPU_SchedBarrierOpOpt,
+  "sched_barrier_opt">{
+   let assemblyFormat = "`<` $value `>`";
----------------
manupak wrote:

@antiagainst  yes make sense. dropped the prefix from the option and added the `allow = ` tokens to SchedBarrierOp.

https://github.com/llvm/llvm-project/pull/98911


More information about the Mlir-commits mailing list