[mlir][GPU] Initialize LLVM exactly once during GPU compiles
No matter how one constructs their SerializeTo* pass, we want to ensure that the LLVM initialization code runs once and only once. This commit adds a static once_flag to ensure that. I've run into mysterious segfaults when calling MLIR GPU compiles from multiple threads, and this commit is a potential fix for the issue. Reviewed By: fmorac Differential Revision: https://reviews.llvm.org/D155226
Loading
Please sign in to comment