[all-commits] [llvm/llvm-project] 4971e5: [mlir][Target] Support Fatbin target for static nv...

Zichen Lu via All-commits all-commits at lists.llvm.org
Tue Dec 10 02:45:46 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4971e53612f9951da844bd718d5d6016b28067b1
      https://github.com/llvm/llvm-project/commit/4971e53612f9951da844bd718d5d6016b28067b1
  Author: Zichen Lu <mikaovo2000 at gmail.com>
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
    M mlir/lib/Target/LLVM/CMakeLists.txt
    M mlir/lib/Target/LLVM/NVVM/Target.cpp

  Log Message:
  -----------
  [mlir][Target] Support Fatbin target for static nvptxcompiler (#118044)

### Background

In `lib/Target/LLVM/NVVM/Target.cpp`, `NVPTXSerializer` compile PTX to
binary with two different flows controlled by
`MLIR_ENABLE_NVPTXCOMPILER`.

If building mlir with `-DMLIR_ENABLE_NVPTXCOMPILER=ON`, the flow does
not check if the target is `gpu::CompilationTarget::Fatbin`, and compile
PTX to cubin directly, which is not consistent with another flow.

### Implement

Use static [nvfatbin](https://docs.nvidia.com/cuda/nvfatbin/index.html)
library.

I have tested it locally, the two flows can return the same Fatbin
result after inputing the same `GpuModule`.



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