[all-commits] [llvm/llvm-project] 286a9d: [mlir][tosa] Add lowering for tosa.rescale to lina...
rsuderman via All-commits
all-commits at lists.llvm.org
Thu Mar 18 16:15:24 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 286a9d467ea904490548a25e3c73ad0d50190b43
https://github.com/llvm/llvm-project/commit/286a9d467ea904490548a25e3c73ad0d50190b43
Author: Rob Suderman <rob.suderman at gmail.com>
Date: 2021-03-18 (Thu, 18 Mar 2021)
Changed paths:
M mlir/include/mlir/Conversion/TosaToStandard/TosaToStandard.h
M mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
M mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td
M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
M mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
M mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
M mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp
M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
M mlir/test/Conversion/TosaToStandard/tosa-to-standard.mlir
Log Message:
-----------
[mlir][tosa] Add lowering for tosa.rescale to linalg.generic
This adds a tosa.apply_scale operation that handles the scaling operation
common to quantized operatons. This scalar operation is lowered
in TosaToStandard.
We use a separate ApplyScale factorization as this is a replicable pattern
within TOSA. ApplyScale can be reused within pool/convolution/mul/matmul
for their quantized variants.
Tests are added to both tosa-to-standard and tosa-to-linalg-on-tensors
that verify each pass is correct.
Reviewed By: silvas
Differential Revision: https://reviews.llvm.org/D98753
More information about the All-commits
mailing list