aboutsummaryrefslogtreecommitdiff
path: root/mlir/include
diff options
context:
space:
mode:
authorRob Suderman <suderman@google.com>2022-12-13 17:19:04 -0800
committerRob Suderman <suderman@google.com>2022-12-13 17:37:36 -0800
commit69c984b6b803f00371dcf028bc9cf9b07911d1d6 (patch)
treebdf12e0cccc5be0a22d56e6115a9922a856b48b7 /mlir/include
parentbfe4c5cc0bb0518c0ad137c0ee715e9f9e839a93 (diff)
downloadllvm-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.h3
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,