[Mlir-commits] [mlir] [MLIR][AMDGPU] Add amdgpu.sched_barrier (PR #98911)
Lei Zhang
llvmlistbot at llvm.org
Mon Jul 15 12:12:09 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 `>`";
----------------
antiagainst wrote:
Maybe something like `allows = ..` so that you can drop the `allow_` prefix in all the above enum cases? this way it prints a bit cleaner given we avoid duplications when multiple cases are allowed.
https://github.com/llvm/llvm-project/pull/98911
More information about the Mlir-commits
mailing list