diff options
author | donald chen <chenxunyu1993@gmail.com> | 2024-11-21 14:17:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 14:17:28 +0800 |
commit | dbe159b3f74ea41e16782fe5708756507d4a014f (patch) | |
tree | 79705210c728bfb629bfee823dbc546bcaf9b4f1 /clang/unittests/Serialization/InMemoryModuleCacheTest.cpp | |
parent | 42775a44c9a6ba8dc03ad4c88fa9321e78ebd434 (diff) | |
download | llvm-dbe159b3f74ea41e16782fe5708756507d4a014f.zip llvm-dbe159b3f74ea41e16782fe5708756507d4a014f.tar.gz llvm-dbe159b3f74ea41e16782fe5708756507d4a014f.tar.bz2 |
[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.
Diffstat (limited to 'clang/unittests/Serialization/InMemoryModuleCacheTest.cpp')
0 files changed, 0 insertions, 0 deletions