Parallel compilation with Comgr
Currently Comgr includes mutex locks around compilation actions to avoid unexpected LLVM multi-threading side effects.
https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/amd-stg-open/lib/comgr/src/comgr.cpp#L1252
It would be nice to fix the issues with LLVM preventing multiple threads from maintaining independent LLVM instances. We could then remove these locks in Comgr to allow for parallel compilation
Just to note that the performance is critical for MIOpen (the performance is what MIOpen delivers to its users). Therefore we are going to implement another workaround in the library (leverage forking) in order to use COMgr in truly parallel mode (but this is not even started yet). In other words, the importance of this ticket is high for us.
CC @averinevg
@lamb-j Hi Jakob, do you really think that this feature is not https://github.com/ROCm/llvm-project/labels/enhancement of Comgr? I am asking because the removal of mutex locks (when LLVM issues are fixed) looks like an enhancement that enables true parallel compilation.