Skip to content

Commit ef4442c

Browse files
hunhoffeclaude
andcommitted
Update bad_npu_nd.mlir stride-alignment test to use size>1 dim
The test triggered the "Stride 1 ... not divisible by 4" error using a size=1 dim with stride=2. After the verifier skips alignment checks for size==1 dims (their stride is never stepped), that case no longer errors. Switch the dim's size from 1 to 2 so the same stride violation occurs on a dim that is actually stepped. Error message is unchanged (same stride index, same value). Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
1 parent a298885 commit ef4442c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/dialect/AIEX/bad_npu_nd.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ module {
140140
%c2 = arith.constant 2 : i64 // Stride of 2 i8s = 2 bytes < 4 byte granularity, should not be possible
141141
%c8 = arith.constant 8 : i64
142142
// expected-error@+1 {{Stride 1 is 2 elements * 1 bytes = 2 bytes, which is not divisible by 4}}
143-
aiex.npu.dma_memcpy_nd (%a[%c0,%c0,%c0,%c0][%c1,%c1,%c1,%c8][%c0,%c0,%c2,%c1]) { metadata = @objectfifo, id = 0 : i64 } : memref<8xi8>
143+
aiex.npu.dma_memcpy_nd (%a[%c0,%c0,%c0,%c0][%c1,%c1,%c2,%c8][%c0,%c0,%c2,%c1]) { metadata = @objectfifo, id = 0 : i64 } : memref<8xi8>
144144
}
145145
%tile_0_0 = aie.tile(0, 0)
146146
aie.shim_dma_allocation @objectfifo (%tile_0_0, MM2S, 0)

0 commit comments

Comments
 (0)