[all-commits] [llvm/llvm-project] 8450bb: [mlir][arith] Add expansion pattern for ext/trunc ...

Rob Suderman via All-commits all-commits at lists.llvm.org
Thu Apr 6 11:33:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8450bbf7f98d0de4b8df7b21835b3f15d25dfa2f
      https://github.com/llvm/llvm-project/commit/8450bbf7f98d0de4b8df7b21835b3f15d25dfa2f
  Author: Robert Suderman <suderman at google.com>
  Date:   2023-04-06 (Thu, 06 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Arith/Transforms/Passes.h
    M mlir/include/mlir/Dialect/Arith/Transforms/Passes.td
    M mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
    M mlir/test/Dialect/Arith/expand-ops.mlir
    A mlir/test/mlir-cpu-runner/expand-arith-ops.mlir

  Log Message:
  -----------
  [mlir][arith] Add expansion pattern for ext/trunc of bf16

bf16 has a trivial truncation/extension behavior with F32 that
can be described in elementary arith operations. Include some
expansions to efficiently convert including rounding towards
infinity for f32 to bf16 truncation.

Reviewed By: jpienaar

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




More information about the All-commits mailing list