[Mlir-commits] [mlir] [mlir] Accept OpaqueAttr as a valid memory space if the context allows unregistered dialects (PR #187682)
Adam Paszke
llvmlistbot at llvm.org
Mon Mar 23 03:59:04 PDT 2026
================
@@ -616,6 +616,12 @@ bool mlir::detail::isSupportedMemorySpace(Attribute memorySpace) {
if (llvm::isa<IntegerAttr, StringAttr, DictionaryAttr>(memorySpace))
return true;
+ // Allow opaque attributes if unregistered dialects are allowed.
+ // They hold unregistered custom dialect attributes.
+ if (memorySpace.getContext()->allowsUnregisteredDialects() &&
+ isa<OpaqueAttr>(memorySpace))
+ return true;
+
// Allow custom dialect attributes.
if (!isa<BuiltinDialect>(memorySpace.getDialect()))
----------------
apaszke wrote:
Sounds good to me, happy to adjust this
https://github.com/llvm/llvm-project/pull/187682
More information about the Mlir-commits
mailing list