[all-commits] [llvm/llvm-project] dbe159: [mlir] [IR] Allow zero strides in StridedLayoutAtt...
donald chen via All-commits
all-commits at lists.llvm.org
Wed Nov 20 22:17:50 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dbe159b3f74ea41e16782fe5708756507d4a014f
https://github.com/llvm/llvm-project/commit/dbe159b3f74ea41e16782fe5708756507d4a014f
Author: donald chen <chenxunyu1993 at gmail.com>
Date: 2024-11-21 (Thu, 21 Nov 2024)
Changed paths:
M mlir/lib/IR/BuiltinAttributes.cpp
M mlir/lib/IR/BuiltinTypes.cpp
M mlir/test/Dialect/Affine/memref-stride-calculation.mlir
M mlir/test/Dialect/MemRef/invalid.mlir
M mlir/test/IR/invalid-builtin-types.mlir
Log Message:
-----------
[mlir] [IR] Allow zero strides in StridedLayoutAttr (#116463)
Disabling memrefs with a stride of 0 was intended to prevent internal
aliasing, but this does not address all cases : internal aliasing can
still occur when the stride is less than the shape.
On the other hand, a stride of 0 can be very useful in certain
scenarios. For example, in architectures that support multi-dimensional
DMA, we can use memref::copy with a stride of 0 to achieve a broadcast
effect.
This commit removes the restriction that strides in memrefs cannot be 0.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list