@@ -114,12 +114,23 @@ SmallVector<Value, 8> getShape(OpBuilder &builder, ConcreteOpTy linalgOp) {
114
114
return getShape (builder, cast<linalg::LinalgOp>(linalgOp.getOperation ()));
115
115
}
116
116
117
+ // / Like `getShape`, but only returns statically-known information, without
118
+ // / generating any new IR. For each shape dimension, returns >=0 if that
119
+ // / dimension is statically known, or -1 otherwise.
120
+ SmallVector<int64_t , 8 > getStaticShape (LinalgOp linalgOp);
121
+
117
122
// / Returns the loop ranges of the `linalgOp`. Applies the inverse of the
118
123
// / concatenated indexing maps to the result of `getShape`. Returns None if
119
124
// / the bounds computation fails.
120
125
Optional<SmallVector<Value, 4 >> getLoopRanges (OpBuilder &builder,
121
126
LinalgOp linalgOp);
122
127
128
+ // / Returns the statically-known loop ranges of the `linalgOp`. Applies the
129
+ // / inverse of the concatenated indexing maps to the result of `getStaticShape`.
130
+ // / Returns None if inverting the concatenated indexing map fails. Returns -1
131
+ // / for non-statically-known loop ranges.
132
+ Optional<SmallVector<int64_t , 4 >> getStaticLoopRanges (LinalgOp linalgOp);
133
+
123
134
// / Returns the values obtained by applying `map` to the list of values.
124
135
SmallVector<Value, 4 > applyMapToValues (OpBuilder &b, Location loc,
125
136
AffineMap map, ValueRange values);
0 commit comments