[Mlir-commits] [mlir] [mlir-python] Fix duplicate EnumAttr builder registration across dialects. (PR #187191)
Jacques Pienaar
llvmlistbot at llvm.org
Wed Mar 18 22:57:47 PDT 2026
================
@@ -58,11 +58,14 @@ class MLIR_PYTHON_API_EXPORTED PyGlobals {
bool loadDialectModule(std::string_view dialectNamespace);
/// Adds a user-friendly Attribute builder.
- /// Raises an exception if the mapping already exists and replace == false.
+ /// Raises an exception if the mapping already exists and replace == false
+ /// and allow_existing == false.
+ /// Silently skips registration if allow_existing == true and the mapping
+ /// already exists (first registration wins).
----------------
jpienaar wrote:
And this is something under the user's control Python side via explicit calls?
https://github.com/llvm/llvm-project/pull/187191
More information about the Mlir-commits
mailing list