[Mlir-commits] [mlir] [mlir][memref] Allow out-of-bounds semantics for memref.subview (PR #152164)
Matthias Springer
llvmlistbot at llvm.org
Tue Aug 5 11:53:28 PDT 2025
================
@@ -2047,11 +2047,9 @@ def SubViewOp : MemRef_OpWithOffsetSizesAndStrides<"subview", [
result_offset = src_offset + dot_product(offset_operands, src_strides)
```
- The offset, size and stride operands must be in-bounds with respect to the
- source memref. When possible, the static operation verifier will detect
- out-of-bounds subviews. Subviews that cannot be confirmed to be in-bounds
- or out-of-bounds based on compile-time information are valid. However,
- performing an out-of-bounds subview at runtime is undefined behavior.
+ The operation does not guarantee if the created subview is in-bounds. It is
----------------
matthias-springer wrote:
Can we clarify what exactly out-of-bounds means? Something along the lines of:
```
Subviews are allowed to run out-of-bounds. Both the offset and "offset + size" are allowed to be larger than the respective source dimension size. They cannot be negative.
```
https://github.com/llvm/llvm-project/pull/152164
More information about the Mlir-commits
mailing list