[all-commits] [llvm/llvm-project] 03ab30: [MLIR] Split off MLIRExecutionEngineUtils to fix l...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue May 10 01:18:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03ab30686dc4db4b0c4a2652c0d610bb03f220d2
      https://github.com/llvm/llvm-project/commit/03ab30686dc4db4b0c4a2652c0d610bb03f220d2
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/ExecutionEngine/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] Split off MLIRExecutionEngineUtils to fix libMLIR.so build (PR54242)

Building libMLIR.so currently fails with:

> /usr/bin/ld: /tmp/ccNzulEA.ltrans39.ltrans.o: in function `(anonymous namespace)::SerializeToHsacoPass::optimizeLlvm(llvm::Module&, llvm::TargetMachine&)':
> /builddir/build/BUILD/llvm-project-15.0.0.src/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp:328: undefined reference to `mlir::makeOptimizingTransformer(unsigned int, unsigned int, llvm::TargetMachine*)'

This is because MLIRGPUTransforms depends on MLIRExecutionEngine in
https://github.com/llvm/llvm-project/blob/61bb2e4ea82fc5499a271d70d4537383d1942208/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp#L328,
but MLIRExecutionEngine is marked as excluded from libMLIR.so.

However, this code doesn't require the full execution engine: It
only performs middle-end optimization, and does not need any of
the JIT/codegen infrastructure. As such, split off a separate
library MLIRExecutionEngineUtils, which only contains that part
and is not excluded from libMLIR.so.

Fixes https://github.com/llvm/llvm-project/issues/54242.

Differential Revision: https://reviews.llvm.org/D125214




More information about the All-commits mailing list