Skip to content

Commit 473c00b

Browse files
Address reviwer comments
Signed-off-by: Nirvedh <[email protected]>
1 parent 6d7024d commit 473c00b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,11 @@ FailureOr<TilingResult> tensor::bubbleUpPadSlice(OpBuilder &b,
822822
// the source tensor. (Similar to newOffset.)
823823
// srcSize - newOffset represents how much length we have available
824824
// and length - newLow represents how much length we want at most.
825+
// In the dynamic case if ValueBoundsOpInterface is used this calcuation
826+
// will lead to an upper bound of length - newLow. If we calculated the
827+
// ending location as min(some expression, srcSize) and then subtracted
828+
// the new offset then ValueBoundsOpInterface will upper bound by SrcSize
829+
// which is larger than needed.
825830
OpFoldResult newLength = min(sub(srcSize, newOffset), sub(length, newLow));
826831
// Optimization: If low = 0, then newLow = 0. then newLength >= 0 assuming
827832
// length >= 0.

0 commit comments

Comments
 (0)