[all-commits] [llvm/llvm-project] 954cb5: [mlir][Target] Improve ROCDL gpu serialization API...

Fabian Mora via All-commits all-commits at lists.llvm.org
Mon Jun 17 07:03:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 954cb5f9a220eb18afe2d0025722067a8299c41c
      https://github.com/llvm/llvm-project/commit/954cb5f9a220eb18afe2d0025722067a8299c41c
  Author: Fabian Mora <fmora.dev at gmail.com>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M mlir/include/mlir/Target/LLVM/ROCDL/Utils.h
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Target/LLVM/CMakeLists.txt
    M mlir/lib/Target/LLVM/ROCDL/Target.cpp

  Log Message:
  -----------
  [mlir][Target] Improve ROCDL gpu serialization API (#95456)

This patch improves the ROCDL gpu serialization API by:
- Introducing the enum `AMDGCNLibraries` for specifying the AMD GCN
device code libraries to use during linking.
- Removing `getCommonBitcodeLibs` in favor of `AMDGCNLibraries`.
Previously `getCommonBitcodeLibs` would try to load all AMD GCN bitcode
librariesm now it will only load the requested libraries.
- Exposing the `compileToBinary` method and making it virtual, allowing
downstream users to re-use this method.
- Exposing `moduleToObjectImpl`, this method provides a prototype flow
for compiling to binary, allowing downstream users to re-use this
method.
- It also avoids constructing the control variables if no device
libraries are being used.

This patch also changes the behavior of the CMake flag
`DEFAULT_ROCM_PATH`. Before it would fall back to a default value of
`/opt/rocm` if not specified. However, that default value causes fragile
builds in environments with ROCm. Now, the flag falls back to the empty
string, making it clear that **the user must provide a value at LLVM
build time**.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list