Skip to content

Commit

Permalink
Checking syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
pvasireddy-amd committed Nov 1, 2024
1 parent 71722af commit 5e12917
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,13 @@ struct AIEObjectFifoStatefulTransformPass
builder.create<UseLockOp>(builder.getUnknownLoc(), acqLock, acqLockAction,
acqMode);

if (!dims.getValue().empty() && !padDimensions.getValue().empty()) {
builder.create<DMABDOp>(builder.getUnknownLoc(), buff, offset, len, dims,
padDimensions);
if (!dims.getValue().empty() && padDimensions) {
if (!padDimensions.getValue().empty())
builder.create<DMABDOp>(builder.getUnknownLoc(), buff, offset, len,
dims, padDimensions);
else
builder.create<DMABDOp>(builder.getUnknownLoc(), buff, offset, len,
dims);
} else if (!dims.getValue().empty()) {
builder.create<DMABDOp>(builder.getUnknownLoc(), buff, offset, len, dims);
} else {
Expand Down Expand Up @@ -523,11 +527,13 @@ struct AIEObjectFifoStatefulTransformPass
createShimDMA(device, builder, op, channelDir, channelIndex, lockMode,
dims);
} else if (op.getProducerTileOp().isMemTile() &&
channelDir == DMAChannelDir::MM2S) {
channelDir == DMAChannelDir::MM2S &&
!pad_dims.getValue().empty()) {
createMemTileDMA(device, builder, op, channelDir, channelIndex, lockMode,
dims, pad_dims);
} else if (op.getProducerTileOp().isMemTile() &&
channelDir == DMAChannelDir::S2MM) {
(channelDir == DMAChannelDir::S2MM ||
pad_dims.getValue().empty())) {
createMemTileDMA(device, builder, op, channelDir, channelIndex, lockMode,
dims, nullptr);
} else {
Expand Down Expand Up @@ -1478,8 +1484,7 @@ struct AIEObjectFifoStatefulTransformPass
BDDimLayoutArrayAttr consumerDims =
consumer.getDimensionsFromStreamPerConsumer()[0];
createDMA(device, builder, consumer, consumerChan.direction,
consumerChan.channel, 1, consumerDims,
nullptr);
consumerChan.channel, 1, consumerDims, nullptr);
// generate objectFifo allocation info
builder.setInsertionPoint(&device.getBody()->back());

Expand Down

0 comments on commit 5e12917

Please sign in to comment.