Skip to content

Commit 6b70652

Browse files
committed
allow dialect registry updates for single-threaded
1 parent cfb92be commit 6b70652

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mlir/lib/IR/MLIRContext.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,10 @@ void MLIRContext::appendDialectRegistry(const DialectRegistry &registry) {
410410
if (registry.isSubsetOf(impl->dialectsRegistry))
411411
return;
412412

413-
assert(impl->multiThreadedExecutionContext == 0 &&
414-
"appending to the MLIRContext dialect registry while in a "
415-
"multi-threaded execution context");
413+
assert(!impl->threadingIsEnabled ||
414+
impl->multiThreadedExecutionContext == 0 &&
415+
"appending to the MLIRContext dialect registry while in a "
416+
"multi-threaded execution context");
416417
registry.appendTo(impl->dialectsRegistry);
417418

418419
// For the already loaded dialects, apply any possible extensions immediately.

0 commit comments

Comments
 (0)