Skip to content

Commit a298885

Browse files
hunhoffeclaude
andcommitted
Skip stride-alignment check for size==1 dims in verifyBDSizesStrides
A dim with size==1 is never stepped, so its stride is irrelevant to the hardware encoder. The previous check rejected legal BDs with padding `(1,1)` dims on sub-word element types (e.g. i16 on a 4-byte granularity tile): `1 element * 2 bytes = 2 bytes` tripped the "not divisible by 4" rule even though the dim never advances. Caught by test/python/dma_op.py once its innermost dim was made realizable in the previous commit. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
1 parent 2042b2e commit a298885

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/Dialect/AIE/IR/AIEDialect.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,8 @@ mlir::LogicalResult xilinx::AIE::verifyBDSizesStrides(
22412241
for (int i = 0; i < n; ++i) {
22422242
if (i == 0 && inputStrides[i] == 1)
22432243
continue;
2244+
if (inputSizes[i] == 1)
2245+
continue;
22442246
if (inputStrides[i] * elemWidthBits % addressGranularityBits != 0) {
22452247
std::stringstream msg;
22462248
msg << "Stride " << i << " is " << inputStrides[i] << " elements * "

0 commit comments

Comments
 (0)