[all-commits] [llvm/llvm-project] 3abb8d: [MLIR][XeVM] Add xevm.extf op as the inverse of xe...

Sang Ik Lee via All-commits all-commits at lists.llvm.org
Fri Jun 12 13:33:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3abb8d8a05a215f719cd5ebc962e5f07ffbaeaa1
      https://github.com/llvm/llvm-project/commit/3abb8d8a05a215f719cd5ebc962e5f07ffbaeaa1
  Author: Sang Ik Lee <sang.ik.lee at intel.com>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/XeVMOps.td
    M mlir/lib/Conversion/XeGPUToXeVM/XeGPUToXeVM.cpp
    M mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/XeVMDialect.cpp
    A mlir/test/Conversion/XeGPUToXeVM/extf_truncf.mlir
    M mlir/test/Conversion/XeVMToLLVM/xevm_mx-to-llvm.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/xevm.mlir
    A mlir/test/Integration/Dialect/XeVM/GPU/xevm_truncf_extf_raw.mlir
    A mlir/test/Integration/Dialect/XeVM/GPU/xevm_truncf_extf_roundtrip.mlir
    A mlir/test/Integration/Dialect/XeVM/GPU/xevm_truncf_extf_roundtrip_bf16.mlir
    A mlir/test/Integration/Dialect/XeVM/GPU/xevm_truncf_extf_roundtrip_fp4.mlir
    A mlir/test/Integration/Dialect/XeVM/GPU/xevm_truncf_extf_roundtrip_fp4_bf16.mlir

  Log Message:
  -----------
  [MLIR][XeVM] Add xevm.extf op as the inverse of xevm.truncf (#203124)

Add a new xevm.extf operation that extends f8/bf8/f4 values to f16/bf16,
mirroring the existing xevm.truncf op, together with its lowering in
XeVMToLLVM.

Lowering details (XeVMToLLVM):

- bf8/f8 -> f16 via __builtin_IB_bf8tohf_16 / __builtin_IB_hf8tohf_16.

- bf8/f8 -> bf16 via f16 -> f32 (convert_float16) -> bf16
(__builtin_IB_ftobf_16).

- e2m1 (fp4) -> f16/bf16 via __builtin_IB_shfl_idx4_lut and
__builtin_IB_shfl_idx4_to_fp16_8_packed (LUT 7 for f16, 5 for bf16).

Adds the op definition and verifier, conversion/roundtrip/invalid unit
tests, and f8 and fp4 GPU round-trip integration tests.

Adds arith.extf to xevm.extf lowering and arith.truncf to xevm.truncf
lowering in XeGPU to XeVM conversion and unit tests.



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