[all-commits] [llvm/llvm-project] 364472: [Clang][NVPTX] Add NVPTX intrinsics and builtins f...

Steffen Larsen via All-commits all-commits at lists.llvm.org
Tue Jun 29 15:45:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3644726a78e37823b1687a7aa8d186e91570ffe2
      https://github.com/llvm/llvm-project/commit/3644726a78e37823b1687a7aa8d186e91570ffe2
  Author: Steffen Larsen <steffen.larsen at codeplay.com>
  Date:   2021-06-29 (Tue, 29 Jun 2021)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsNVPTX.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/builtins-nvptx-mma.cu
    M clang/test/CodeGen/builtins-nvptx-mma.py
    M llvm/include/llvm/IR/IntrinsicsNVVM.td
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
    M llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
    M llvm/test/CodeGen/NVPTX/lit.local.cfg
    M llvm/test/CodeGen/NVPTX/wmma.py

  Log Message:
  -----------
  [Clang][NVPTX] Add NVPTX intrinsics and builtins for CUDA PTX 6.5 and 7.0 WMMA and MMA instructions

Adds NVPTX builtins and intrinsics for the CUDA PTX `wmma.load`, `wmma.store`, `wmma.mma`, and `mma` instructions added in PTX 6.5 and 7.0.

PTX ISA description of

  - `wmma.load`: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-wmma-ld
  - `wmma.store`: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-wmma-st
  - `wmma.mma`: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-wmma-mma
  - `mma`: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-mma

Overview of `wmma.mma` and `mma` matrix shape/type combinations added with specific PTX versions: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-shape

Authored-by: Steffen Larsen <steffen.larsen at codeplay.com>
Co-Authored-by: Stuart Adams <stuart.adams at codeplay.com>

Reviewed By: tra

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




More information about the All-commits mailing list