[all-commits] [llvm/llvm-project] c16adb: [mlir][Target][NVPTX] Add fatbin support to NVPTX ...

Fabian Mora via All-commits all-commits at lists.llvm.org
Thu Sep 7 04:44:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c16adb0dcb1fb64c16d406e02f73242d0cd247e5
      https://github.com/llvm/llvm-project/commit/c16adb0dcb1fb64c16d406e02f73242d0cd247e5
  Author: Fabian Mora <fmora.dev at gmail.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/IR/CompilationInterfaces.h
    M mlir/include/mlir/Dialect/GPU/Transforms/Passes.td
    M mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
    M mlir/lib/Target/LLVM/NVVM/Target.cpp

  Log Message:
  -----------
  [mlir][Target][NVPTX] Add fatbin support to NVPTX compilation. (#65398)

Currently, the NVPTX tool compilation path only calls `ptxas`; thus, the
GPU running the binary must be an exact match of the arch of the target,
or else the runtime throws an error due to the arch mismatch.

This patch adds a call to `fatbinary`, creating a fat binary with the
cubin object and the PTX code, allowing the driver to JIT the PTX at
runtime if there's an arch mismatch.




More information about the All-commits mailing list