diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2021-07-16 06:49:57 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2021-07-16 06:51:06 +0000 |
commit | 20113d66c7bfe935cf2b300fc6cc3ef996bb847d (patch) | |
tree | 892e0702be106d43060cf8c4f78dfa567244bcc6 | |
parent | b5a84e214d49c56d13dc1fb76273f575e6752c68 (diff) | |
download | llvm-20113d66c7bfe935cf2b300fc6cc3ef996bb847d.zip llvm-20113d66c7bfe935cf2b300fc6cc3ef996bb847d.tar.gz llvm-20113d66c7bfe935cf2b300fc6cc3ef996bb847d.tar.bz2 |
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.
-rw-r--r-- | mlir/lib/Pass/Pass.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp index f1f6999..af86c4e 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 |