[Mlir-commits] [mlir] [MLIR][GPU-LLVM] Convert `gpu.func` to `llvm.func` (PR #101664)

Mehdi Amini llvmlistbot at llvm.org
Mon Aug 5 05:31:01 PDT 2024


================
@@ -58,6 +58,10 @@ def LLVM_Dialect : Dialect {
     /// effect when lowering to the LLVMDialect.
     static StringRef getReadnoneAttrName() { return "llvm.readnone"; }
 
+    /// Name of the helper attribute to keep GPU workgroup attribution size
+    /// information when converting from GPU to LLVM.
+    static StringRef getWorkgroupAttribSizeAttrName() { return "llvm.mlir.workgroup_attrib_size"; }
----------------
joker-eph wrote:

Can you use the:
```
      let discardableAttrs = (ins
         "mlir::IntegerAttr":$llvm.mlir.workgroup_attrib_size,
      );
```

Construction instead? This provides a type-safe helper to manipulate discardable attributes defined by dialects.

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


More information about the Mlir-commits mailing list