[all-commits] [llvm/llvm-project] f91e0b: [SPIRV] Add support for the SPIR-V extension SPV_K...

YixingZhang007 via All-commits all-commits at lists.llvm.org
Mon Sep 22 05:53:19 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f91e0bf16098decbee75233f67109751f2a2e79b
      https://github.com/llvm/llvm-project/commit/f91e0bf16098decbee75233f67109751f2a2e79b
  Author: YixingZhang007 <yixing.zhang at intel.com>
  Date:   2025-09-22 (Mon, 22 Sep 2025)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp
    M llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
    M llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td
    M llvm/test/CodeGen/SPIRV/basic_float_types.ll
    A llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bfloat16/bfloat16.ll
    A llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bfloat16/bfloat16_cooperative_matrix.ll
    A llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bfloat16/bfloat16_dot.ll

  Log Message:
  -----------
  [SPIRV] Add support for the SPIR-V extension SPV_KHR_bfloat16 (#155645)

This PR introduces the support for the SPIR-V extension
`SPV_KHR_bfloat16`. This extension extends the `OpTypeFloat` instruction
to enable the use of bfloat16 types with cooperative matrices and dot
products.

TODO:
Per the `SPV_KHR_bfloat16` extension, there are a limited number of
instructions that can use the bfloat16 type. For example, arithmetic
instructions like `FAdd` or `FMul` can't operate on `bfloat16` values.
Therefore, a future patch should be added to either emit an error or
fall back to FP32 for arithmetic in cases where bfloat16 must not be
used.

Reference Specification:

https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_bfloat16.asciidoc



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