-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move AMDAIEAssignChannelsPass before AMDAIEAssignNpuDmaBdIdsPass #980
Conversation
@@ -61,6 +61,32 @@ FailureOr<AMDAIE::TileOp> getGeneratorTileOp( | |||
return tileOp; | |||
}; | |||
|
|||
/// Utility to retrieve a ChannelOp from a DMA copy operation. | |||
template <CopyOpOperateOn OperateOn> | |||
FailureOr<AMDAIE::ChannelOp> getChannelOp(AMDAIE::NpuDmaCpyNdOp &npuDmaOp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this reusable, could you make this a method of NpuDmaCpyNdOp
instead? You likely need to expose it as getSourceChannelOp
and getTargetChannelOp
and use this function under the hood.
AMDAIE::ChannelOp channelOp = maybeChannelOp.value(); | ||
uint32_t channel = channelOp.getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMDAIE::ChannelOp channelOp = maybeChannelOp.value(); | |
uint32_t channel = channelOp.getValue(); | |
uint32_t channel = maybeChannelOp.value().getValue(); |
…d-aie into zhewen_moveAssignChannels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is to resolve the following comment:
iree-amd-aie/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/AMDAIEAssignNpuDmaBdIds.cpp
Lines 269 to 274 in e623a6a
ChannelOp
from givenNpuDmaCpyNdOp
assign-npu-dma-bd-ids.mlir
is refactored