[all-commits] [llvm/llvm-project] db647f: [mlir][GPU] Initialize LLVM exactly once during GP...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Fri Jul 14 12:11:06 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db647f5bd8fd337260bf636897f45ecfac8eb4cb
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2023-07-14 (Fri, 14 Jul 2023)

  Changed paths:
    M mlir/lib/Dialect/GPU/Transforms/SerializeToCubin.cpp
    M mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp

  Log Message:
  [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

More information about the All-commits mailing list