[all-commits] [llvm/llvm-project] e8c833: [MLIR][XeGPU] Lower arith.truncf wider than one xe...

Sang Ik Lee via All-commits all-commits at lists.llvm.org
Thu Sep 10 09:29:21 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e8c833b96ccd6a9e950e9a67fb59d451668532d1
      https://github.com/llvm/llvm-project/commit/e8c833b96ccd6a9e950e9a67fb59d451668532d1
  Author: Sang Ik Lee <sang.ik.lee at intel.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M mlir/lib/Conversion/XeGPUToXeVM/XeGPUToXeVM.cpp
    M mlir/test/Conversion/XeGPUToXeVM/extf_truncf.mlir

  Log Message:
  -----------
  [MLIR][XeGPU] Lower arith.truncf wider than one xevm.truncf group (#217130)

`xevm.truncf` lowers to device builtins that convert exactly 16 f16/bf16
elements
per call, so `TruncfToXeVMPattern` only matched a 16-element source. A
workgroup-level mxfp GEMM that quantizes A in the kernel produces a
wider one,
which nothing else lowers, so the module failed to build:

  %r = arith.truncf %a : vector<32xbf16> to vector<32xf4E2M1FN>
// cannot be converted to LLVM IR: missing
`LLVMTranslationDialectInterface`
  // registration ... for op: arith.truncf

Convert a whole number of groups at a time instead: slice the source
into
16-element groups, emit one `xevm.truncf` per group, and concatenate the
packed
results before the final bitcast. A source of exactly one group takes
the original
path with unchanged code, and a source that is not a whole number of
groups is
still left to the regular arith-to-LLVM path.

`arith.extf` carries the same restriction on its result, but no wider
case has come
up, so it is left as is.



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