[Mlir-commits] [mlir] [mlir] Avoid parallel code in single-threaded builds (PR #229794)
Anutosh Bhat
llvmlistbot at llvm.org
Wed Oct 7 20:50:48 PDT 2026
================
@@ -41,7 +41,8 @@ LogicalResult failableParallelForEach(MLIRContext *context, IteratorT begin,
// If multithreading is disabled or there is a small number of elements,
// process the elements directly on this thread.
- if (!context->isMultithreadingEnabled() || numElements <= 1) {
+ if (!LLVM_ENABLE_THREADS || !context->isMultithreadingEnabled() ||
+ numElements <= 1) {
----------------
anutosh491 wrote:
Thanks for the suggestion. Made it the latest commit !
https://github.com/llvm/llvm-project/pull/229794
More information about the Mlir-commits
mailing list