[Mlir-commits] [mlir] 20113d6 - Fix mismatch between the provisioning of asyncExecutors and the actual thread count currently in the context (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Jul 15 23:51:16 PDT 2021


Author: Mehdi Amini
Date: 2021-07-16T06:51:06Z
New Revision: 20113d66c7bfe935cf2b300fc6cc3ef996bb847d

URL: https://github.com/llvm/llvm-project/commit/20113d66c7bfe935cf2b300fc6cc3ef996bb847d
DIFF: https://github.com/llvm/llvm-project/commit/20113d66c7bfe935cf2b300fc6cc3ef996bb847d.diff

LOG: Fix mismatch between the provisioning of asyncExecutors and the actual thread count currently in the context (NFC)

This fixes an assert in some deployment where the threadpool is
customized.

Added: 
    

Modified: 
    mlir/lib/Pass/Pass.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp
index f1f699983133d..af86c4ef03607 100644
--- a/mlir/lib/Pass/Pass.cpp
+++ b/mlir/lib/Pass/Pass.cpp
@@ -564,8 +564,7 @@ void OpToOpPassAdaptor::runOnOperationAsyncImpl(bool verifyPasses) {
   // Create the async executors if they haven't been created, or if the main
   // pipeline has changed.
   if (asyncExecutors.empty() || hasSizeMismatch(asyncExecutors.front(), mgrs))
-    asyncExecutors.assign(llvm::hardware_concurrency().compute_thread_count(),
-                          mgrs);
+    asyncExecutors.assign(context->getThreadPool().getThreadCount(), mgrs);
 
   // Run a prepass over the operation to collect the nested operations to
   // execute over. This ensures that an analysis manager exists for each


        


More information about the Mlir-commits mailing list