Skip to content

Commit a85ea9a

Browse files
committed
[MLIR][doc] Clarify allowUnregisteredDialects() as "testing option" (NFC)
Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D144615
1 parent bcb8a94 commit a85ea9a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mlir/include/mlir/IR/MLIRContext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ class MLIRContext {
132132
bool allowsUnregisteredDialects();
133133

134134
/// Enables creating operations in unregistered dialects.
135+
/// This option is **heavily discouraged**: it is convenient during testing
136+
/// but it is not a good practice to use it in production code. Some system
137+
/// invariants can be broken (like loading a dialect after creating
138+
/// operations) without being caught by assertions or other means.
135139
void allowUnregisteredDialects(bool allow = true);
136140

137141
/// Return true if multi-threading is enabled by the context.

0 commit comments

Comments
 (0)