[Mlir-commits] [mlir] [MLIR] Add ODS support for generating helpers for dialect (discardable) attributes (PR #77024)

Mehdi Amini llvmlistbot at llvm.org
Wed Jan 10 13:06:58 PST 2024


================
@@ -34,6 +34,8 @@ class Dialect {
   // pattern or interfaces.
   list<string> dependentDialects = [];
 
+  dag discardableAttrs = (ins);
----------------
joker-eph wrote:

I don't know if I followed correctly what you're asking about, but these are helpers to manage discardable attributes. The idea is that for example the ROCDL dialect involves a discardable attribute with the key `rocdl.reqd_work_group_size`, and the associated Attribute must be a `DenseI32ArrayAttr`.
This feature will generate a helper for managing this discardable attribute on operations. The operations don't know anything about the attribute, it's a property of the dialect itself.


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


More information about the Mlir-commits mailing list