[Mlir-commits] [mlir] [mlir] Support thread-safe context access without parallel execution (PR #236551)
Mehdi Amini
llvmlistbot at llvm.org
Thu Oct 29 03:47:59 PDT 2026
================
@@ -287,14 +290,15 @@ class MLIRContextImpl {
ownedThreadPool = std::make_unique<llvm::DefaultThreadPool>();
threadPool = ownedThreadPool.get();
} else {
- disableUniquerMultithreading(true);
+ setThreadSafeLocking(false);
}
}
- /// Update the threading mode for each of the uniquers.
- void disableUniquerMultithreading(bool disable) {
- affineUniquer.disableMultithreading(disable);
- attributeUniquer.disableMultithreading(disable);
- typeUniquer.disableMultithreading(disable);
+ /// Update the locking mode for context access and each of the uniquers.
+ void setThreadSafeLocking(bool enable) {
+ threadSafeLockingIsEnabled = enable;
+ affineUniquer.disableMultithreading(!enable);
----------------
joker-eph wrote:
Good point, done.
https://github.com/llvm/llvm-project/pull/236551
More information about the Mlir-commits
mailing list