openqasm / qe-compiler

An MLIR based compiler dynamic circuit compiler for real-time control systems supporting OpenQASM 3
Other
46 stars 15 forks source link

ThreadedCompilationManager is not threadsafe for multiple concurrent calls #214

Open taalexander opened 9 months ago

taalexander commented 9 months ago

In this comment on the LLVM forums @joker-eph noted that the current API itself is not threadsafe if concurrent calls are made to compileMLIR which might concurrently access and use the same pass manager.

Currently, we only make one call per target compilation manager. As we have plans to extend how the C++ API is called/used this may be an issue in the nearish future.