[llvm-branch-commits] [mlir] [mlir][ROCDL] Add `rocdl.xnack` and `rocdl.sramecc` module attributes (PR #222444)
Krzysztof Drewniak via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 9 23:37:53 PDT 2026
================
@@ -103,6 +103,16 @@ LogicalResult ROCDLDialect::verifyOperationAttribute(Operation *op,
<< "' attribute attached to unexpected op";
}
}
+ // xnack/sramecc describe the whole code object.
+ if (attr.getName() == xnackAttrName.getName() ||
+ attr.getName() == srameccAttrName.getName()) {
+ if (!LLVM::satisfiesLLVMModule(op))
+ return op->emitError() << "'" << attr.getName().getValue()
+ << "' is only supported on modules";
+ if (!isa<BoolAttr>(attr.getValue()))
+ return op->emitError()
+ << "'" << attr.getName().getValue() << "' must be a boolean";
----------------
krzysz00 wrote:
The name is a `StringAttr` (read, string interned into the context) and getting the `StringRef` out of it wants a `getValue()`. I'll double-check tomorrow if `StringAttr` itself can be printed
https://github.com/llvm/llvm-project/pull/222444
More information about the llvm-branch-commits
mailing list