Skip to content

Commit

Permalink
Change order
Browse files Browse the repository at this point in the history
  • Loading branch information
pvasireddy-amd committed Nov 12, 2024
1 parent cbab8e9 commit 970841d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Dialect/AIE/IR/AIEDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1883,13 +1883,11 @@ LogicalResult DMABDOp::verify() {
if (!dims.has_value())
return emitOpError() << "Padding requires n-d data layouts expressed as"
<< " wrap(s) and stride(s).";
if(!paddims.has_value())
return emitOpError() << "Padding requires n-d padding layouts.";
if (!targetModel.isMemTile(parentTileId.col, parentTileId.row))
return emitOpError() << "Padding is only supported by memtile dma bds.";
if (dims->size() != paddims->size())
return emitOpError() << "Mismatch number of dimensions between padding(s)"
<< " and wrap(s) and stride(s).";
if (!targetModel.isMemTile(parentTileId.col, parentTileId.row))
return emitOpError() << "Padding is only supported by memtile dma bds.";
int actuallen = 1;
for (unsigned i = 0; i < paddims->size(); i++) {
auto dim = (*dims)[i];
Expand Down
4 changes: 4 additions & 0 deletions lib/Dialect/AIEX/Transforms/AIEDMATasksToNPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ struct AIEDMATasksToNPUPass : AIEDMATasksToNPUBase<AIEDMATasksToNPUPass> {
padBefore[i] = (*padDims)[j].getConstPadBefore();
padAfter[i] = (*padDims)[j].getConstPadAfter();
}
for (size_t i = padDims->size(); i < dims->size(); i++) {
padBefore[i] = 0;
padAfter[i] = 0;
}
} else if (padDims) {
return bd_op->emitOpError()
<< "supports padding only for MM2S direction on MemTiles.";
Expand Down

0 comments on commit 970841d

Please sign in to comment.