llvm-project
dbe159b3 - [mlir] [IR] Allow zero strides in StridedLayoutAttr (#116463)

Commit
1 year ago
[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.
Author
Parents
Loading