[all-commits] [llvm/llvm-project] 763109: [mlir][gpu] Use `known_block_size` to set `maxntid...

Guray Ozen via All-commits all-commits at lists.llvm.org
Mon Jan 8 05:49:33 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 763109e346b90193027b24743e266495d992b1c6
      https://github.com/llvm/llvm-project/commit/763109e346b90193027b24743e266495d992b1c6
  Author: Guray Ozen <guray.ozen at gmail.com>
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
    M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
    M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir

  Log Message:
  -----------
  [mlir][gpu] Use `known_block_size` to set `maxntid` for NVVM target (#77301)

Setting thread block size with `maxntid` on the kernel has great
performance benefits. In this way, downstream PTX compiler can do better
register allocation.

MLIR's `gpu.launch` and `gpu.launch_func` already has an attribute
(`known_block_size`) that keeps the thread block size when it is known.
This PR simply uses this attribute to set `maxntid`.




More information about the All-commits mailing list