[MLIR] Add extra locking during cubin generation.
authorStephan Herhut <herhut@google.com>
Tue, 21 Apr 2020 19:21:37 +0000 (21:21 +0200)
committerStephan Herhut <herhut@google.com>
Wed, 22 Apr 2020 06:57:45 +0000 (08:57 +0200)
commitc22876b550f5905b1cb7a4a0f329e76fac3e0232
tree62c404e2c8c35411bcda8c1156c6430745fb8039
parent84e4c09995a779d5057e2ce831ced9307a8164af
[MLIR] Add extra locking during cubin generation.

We also need to lock the LLVMDialect mutex when initializing
LLVM targets or destroying llvm modules concurrently. Added another
scoped lock to that effect.

Differential Revision: https://reviews.llvm.org/D78580
mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp