Skip to content
Commit db647f5b authored by Krzysztof Drewniak's avatar Krzysztof Drewniak
Browse files

[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
parent 4df01dc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment