[all-commits] [llvm/llvm-project] 2c9ddf: [mlir][Tosa] fix fp16/bf16 support for AvgPool2d (...

fabrizio-indirli via All-commits all-commits at lists.llvm.org
Fri Oct 13 08:42:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c9ddfc7852ed88dd88bb38e9518404a623c70b5
      https://github.com/llvm/llvm-project/commit/2c9ddfc7852ed88dd88bb38e9518404a623c70b5
  Author: fabrizio-indirli <fabrizio.indirli at arm.com>
  Date:   2023-10-13 (Fri, 13 Oct 2023)

  Changed paths:
    M mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
    M mlir/test/Dialect/Tosa/ops.mlir

  Log Message:
  -----------
  [mlir][Tosa] fix fp16/bf16 support for AvgPool2d (#68718)

Currently, the AvgPool2d operation in the TOSA MLIR dialect does not
accept half-precision Fp16 and Bf16 tensors, conversely to what stated
in the [TOSA
specification](https://www.mlplatform.org/tosa/tosa_spec.html#_avg_pool2d).
This issue was previously raised: #63424 here on Github and it is due to
a bug in the AvgPool2d verifier.

This patch fixes the AvgPool2d verifier to accept fp16 & bf16 datatype
for input/output tensors and accumulator, and it adds related LIT test
cases in Tosa/ops.mlir.




More information about the All-commits mailing list