<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62426>62426</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            "appending to the MLIRContext dialect registry while in a " "multi-threaded execution context"' failed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dxy-cs
      </td>
    </tr>
</table>

<pre>
    Here, error info:

> tpuc-opt: /workspace/tpu-mlir/third_party/llvm-project/mlir/lib/IR/MLIRContext.cpp:386: void mlir::MLIRContext::appendDialectRegistry(const mlir::DialectRegistry&): Assertion `impl->multiThreadedExecutionContext == 0 && "appending to the MLIRContext dialect registry while in a " "multi-threaded execution context"' failed.

Does it mean that appending to the MLIRContext dialect registry cannot be executed with multiple threads? Why is there such a design in MLIR? And how can I solve it? 
Looking forward to your answers. Thanks.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8k0FvozAQhX-NuYyCnCEBcuCQbYq2UvdSVdrjyuBJ8NaxkT00zb9fmVBtpJ72sgcQws_zvdG8UTGakyNqxPab2B4yNfHgQ6M_rqs-Zp3X1-Y7BRL4ABSCD2Dc0YtiL-RByM938Qg8Tv3KjyyKPQhsLz68xVH1JLDlcVqdrQnpczBB_xpV4KvA1tr382oM_jf1LLBdNNZ0AtunF4Htj-enlwfvmD4478dRFPuiLhPh3RsNs77Yi2J_p7v9UONITh-MstTzC51M5HAVWPfeRb67-EVRCtwlwD5GCmy8A1FKcx7tShSP58myeR0CKU368YP6KSkWMIjiIIoDSJirlCAQbzaMOwF74IHgzijoGxvCAofLYCyBcaDS3fTMwBUvRKBPJPRLs4gCKzgqY0nn9yM5eIpgGM6kHPCgGP7NS6-c8wwdLVDScDE8wOxotAQ3U1EULfwcrmBiqhkI4tQPoEBTilVqJmGSau80DP6SKsMTRG_fCQynk5vjZ-_fkrujDxcVdHJ59VMA5eKFQszhdVDuLeaZbgq9K3Yqo2Zd1ljWcleus6GpqkqVW7XbSFXVqHCtO0m1VFWltlLrY2YalFjIDdbrNeJmnW-Oupay12tdy66qtNhIOitj8xTM3IdTZmKcqClxg2VmVUc2znuC6OgC82EawfaQhWYOczedothIayLHv1XYsKXmf-chm4JtBuYxpqxjK7A9GR6mLu_9edm-r0s4NxUFtnPTfwIAAP__ZJpcYQ">