[Mlir-commits] [mlir] [MLIR][AMDGPU] Add amdgpu.sched_barrier (PR #98911)
Manupa Karunaratne
llvmlistbot at llvm.org
Tue Jul 16 08:06:43 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",
+ [
+ I32BitEnumAttrCaseNone<"none">,
+ I32BitEnumAttrCaseBit<"non_mem_non_sideffect", 0>,
+ I32BitEnumAttrCaseBit<"valu", 1>,
+ I32BitEnumAttrCaseBit<"salu", 2>,
+ I32BitEnumAttrCaseBit<"mfma_wmma", 3>,
+ I32BitEnumAttrCaseBit<"all_vmem", 4>,
+ I32BitEnumAttrCaseBit<"vmem_read", 5>,
+ I32BitEnumAttrCaseBit<"vmem_write", 6>,
+ I32BitEnumAttrCaseBit<"all_ds", 7>,
+ I32BitEnumAttrCaseBit<"ds_read", 8>,
+ I32BitEnumAttrCaseBit<"ds_write", 9>,
+ I32BitEnumAttrCaseBit<"transcendental", 10>
+ ]> {
+ let genSpecializedAttr = 0;
+ let cppNamespace = "::mlir::amdgpu";
+}
+
+def AMDGPU_SchedBarrierOpOptAttr : EnumAttr<AMDGPU_Dialect, AMDGPU_SchedBarrierOpOpt,
+ "sched_barrier_opt">{
+ let assemblyFormat = "`<` $value `>`";
----------------
manupak wrote:
Yes, its true thats its not needed but its stylistic choice which I came upon in many places in the codebase.
E.g. : https://github.com/llvm/llvm-project/blob/78dea4c1ea77ba683c720d2a2c0f32d03989f8cc/mlir/include/mlir/Dialect/Vector/IR/VectorAttributes.td#L49
Therefore, thought I d do it here as well. Im happy to remove if people feel strongly about it.
https://github.com/llvm/llvm-project/pull/98911
More information about the Mlir-commits
mailing list