[PATCH] D78207: [MLIR] Allow for multiple gpu modules during translation.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 01:03:05 PDT 2020


rriddle added a comment.

This is causing TSAN failures. Looks like ConvertKernelFuncToCubin isn't thread safe. More specifically the call to LLVMInitializeNVPTXTargetInfo.

mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp:62:5



================
Comment at: mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:500
+  // Lock access to the llvm context.
+  llvm::sys::SmartScopedLock<true> scopedLock(
+      llvmDialect->getLLVMContextMutex());
----------------
Can we just lock once at beginning?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78207/new/

https://reviews.llvm.org/D78207





More information about the llvm-commits mailing list