diff options
author | Rob Suderman <suderman@google.com> | 2022-12-13 17:19:04 -0800 |
---|---|---|
committer | Rob Suderman <suderman@google.com> | 2022-12-13 17:37:36 -0800 |
commit | 69c984b6b803f00371dcf028bc9cf9b07911d1d6 (patch) | |
tree | bdf12e0cccc5be0a22d56e6115a9922a856b48b7 /mlir/include | |
parent | bfe4c5cc0bb0518c0ad137c0ee715e9f9e839a93 (diff) | |
download | llvm-69c984b6b803f00371dcf028bc9cf9b07911d1d6.zip llvm-69c984b6b803f00371dcf028bc9cf9b07911d1d6.tar.gz llvm-69c984b6b803f00371dcf028bc9cf9b07911d1d6.tar.bz2 |
[mlir][tosa] Fix padding for tosa.conv2d and tosa.depthwise_conv2d decomposition
Decomposition did not take padding into account when decomposing into fully
connected operation.
Reviewed By: NatashaKnk
Differential Revision: https://reviews.llvm.org/D139500
Diffstat (limited to 'mlir/include')
-rw-r--r-- | mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h b/mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h index 5c30ddf..6e60e5a 100644 --- a/mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h +++ b/mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h @@ -38,6 +38,9 @@ Value clampFloatHelper(Location loc, Value arg, Value min, Value max, Value clampIntHelper(Location loc, Value arg, Value min, Value max, OpBuilder &rewriter); +// Determines whether the integer value falls witin the range of integer type. +bool validIntegerRange(IntegerType ty, int64_t value); + // Returns the values in an attribute as an array of values. template <typename T> void getValuesFromIntArrayAttribute(ArrayAttr attr, |