[all-commits] [llvm/llvm-project] 03de9b: [mlir][tosa] Extend cancelling block-scaled cast o...

Ian Tayler Lessa via All-commits all-commits at lists.llvm.org
Wed Jul 29 06:31:41 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03de9b148a19996fd722e9af6d09ecaf95f8a1b2
      https://github.com/llvm/llvm-project/commit/03de9b148a19996fd722e9af6d09ecaf95f8a1b2
  Author: Ian Tayler Lessa <ian.taylerlessa at arm.com>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
    M mlir/test/Dialect/Tosa/canonicalize.mlir

  Log Message:
  -----------
  [mlir][tosa] Extend cancelling block-scaled cast optimisation to bf16 (#212517)

The CancellingBlockScaledCastsOptimization optimises away sequences
where a block-scaled tensor is cast to fp32 and then cast back to its
original block-scaled type.

This patch extends it to also cover cases where the intermediate type is
bf16, since the 7 bits of mantissa and 8 bits in the exponent are
sufficient to encode any `element * scale` product with valid
block-scaled type combinations.

---------

Signed-off-by: Ian Tayler Lessa <ian.taylerlessa at arm.com>



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