[Mlir-commits] [mlir] a85ea9a - [MLIR][doc] Clarify `allowUnregisteredDialects()` as "testing option" (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Feb 24 16:34:38 PST 2023
Author: Mehdi Amini
Date: 2023-02-24T17:34:25-07:00
New Revision: a85ea9a8a6a0818889b363cc8dcdf972fce401f9
URL: https://github.com/llvm/llvm-project/commit/a85ea9a8a6a0818889b363cc8dcdf972fce401f9
DIFF: https://github.com/llvm/llvm-project/commit/a85ea9a8a6a0818889b363cc8dcdf972fce401f9.diff
LOG: [MLIR][doc] Clarify `allowUnregisteredDialects()` as "testing option" (NFC)
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D144615
Added:
Modified:
mlir/include/mlir/IR/MLIRContext.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/MLIRContext.h b/mlir/include/mlir/IR/MLIRContext.h
index 7537f0c365723..5750dfccbb49f 100644
--- a/mlir/include/mlir/IR/MLIRContext.h
+++ b/mlir/include/mlir/IR/MLIRContext.h
@@ -132,6 +132,10 @@ class MLIRContext {
bool allowsUnregisteredDialects();
/// Enables creating operations in unregistered dialects.
+ /// This option is **heavily discouraged**: it is convenient during testing
+ /// but it is not a good practice to use it in production code. Some system
+ /// invariants can be broken (like loading a dialect after creating
+ /// operations) without being caught by assertions or other means.
void allowUnregisteredDialects(bool allow = true);
/// Return true if multi-threading is enabled by the context.
More information about the Mlir-commits
mailing list