[mlir][tosa] Quantized tosa.avg_pool2d lowering to linalg
authorRob Suderman <rob.suderman@gmail.com>
Wed, 25 Aug 2021 01:23:21 +0000 (18:23 -0700)
committerRob Suderman <rob.suderman@gmail.com>
Wed, 25 Aug 2021 01:54:23 +0000 (18:54 -0700)
commit5541a05d6a5a74424dd6d98cfb6d9014a5fb17ca
treeee6fb10f1916b83d7d301086059cb137d68f19d2
parent4ef1770abd11dff3f892a32eb461a2e5f72f9078
[mlir][tosa] Quantized tosa.avg_pool2d lowering to linalg

Includes the quantized version of average pool lowering to linalg dialect.
This includes a lit test for the transform. It is not 100% correct as the
multiplier / shift should be done in i64 however this is negligable rounding
difference.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D108676
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir