[all-commits] [llvm/llvm-project] 0e8a41: [CUDA, NVPTX] Added basic __bf16 support for NVPTX.

Artem Belevich via All-commits all-commits at lists.llvm.org
Tue Oct 25 11:10:08 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e8a414ab3d330ebb2996ec95d8141618ee0278b
      https://github.com/llvm/llvm-project/commit/0e8a414ab3d330ebb2996ec95d8141618ee0278b
  Author: Artem Belevich <tra at google.com>
  Date:   2022-10-25 (Tue, 25 Oct 2022)

  Changed paths:
    M clang/lib/Basic/Targets/NVPTX.cpp
    M clang/lib/Basic/Targets/NVPTX.h
    A clang/test/CodeGenCUDA/bf16.cu
    A clang/test/SemaCUDA/bf16.cu
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
    M llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
    M llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp
    M llvm/lib/Target/NVPTX/NVPTXRegisterInfo.td
    A llvm/test/CodeGen/NVPTX/bf16.ll

  Log Message:
  -----------
  [CUDA, NVPTX] Added basic __bf16 support for NVPTX.

Recent Clang changes expose _bf16 types for SSE2-enabled host compilations and
that makes those types visible furing GPU-side compilation, where it currently
fails with Sema complaining that __bf16 is not supported.

Considering that __bf16 is a storage-only type, enabling it for NVPTX if it's
enabled on the host should pose no issues, correctness-wise.

Recent NVIDIA GPUs have introduced bf16 support, so we'll likely grow better
support for __bf16 on NVPTX going forward.

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




More information about the All-commits mailing list