Skip to content

Commit

Permalink
Do more checks even when skipTransformationChecks==true
Browse files Browse the repository at this point in the history
  • Loading branch information
hunhoffe committed Oct 24, 2024
1 parent c95ab91 commit 4c54bd3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Dialect/AIEX/IR/AIEXDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ verifyStridesWraps(mlir::Operation *forOp, mlir::MemRefType referencedBufType,
return forOp->emitOpError("Stride 3 must be a non-negative integer.");
}

if (skipTransformationChecks) {
return success();
}

for (int i = 0; i < 4; i++) {
// strides[0] == 1 is ok iff the transfer size is a multiple of
// addressGranularity, which is checked below
Expand All @@ -219,7 +215,7 @@ verifyStridesWraps(mlir::Operation *forOp, mlir::MemRefType referencedBufType,
}
}

if (hardwareSizes[0] > (1 << wrap_bits) - 1)
if (!skipTransformationChecks && hardwareSizes[0] > (1 << wrap_bits) - 1)
return forOp->emitOpError(
"Size 0 exceeds the [0:" + std::to_string((1 << wrap_bits) - 1) +
"] range.");
Expand Down

0 comments on commit 4c54bd3

Please sign in to comment.