Skip to content

Commit fa326ca

Browse files
authored
Reduce non-determinism in router (#2603)
1 parent 667c0d7 commit fa326ca

File tree

5 files changed

+97
-142
lines changed

5 files changed

+97
-142
lines changed

include/aie/Dialect/AIE/IR/AIEDialect.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ using Connect = struct Connect {
154154
bool operator==(const Connect &rhs) const {
155155
return std::tie(src, dst) == std::tie(rhs.src, rhs.dst);
156156
}
157+
158+
bool operator!=(const Connect &rhs) const { return !(*this == rhs); }
159+
160+
bool operator<(const Connect &rhs) const {
161+
return std::tie(src, dst) < std::tie(rhs.src, rhs.dst);
162+
}
157163
};
158164

159165
using DMAChannel = struct DMAChannel {

include/aie/Dialect/AIE/Transforms/AIEPasses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct AIEPathfinderPass : AIERoutePathfinderFlowsBase<AIEPathfinderPass> {
7070
void runOnPacketFlow(DeviceOp d, mlir::OpBuilder &builder,
7171
DynamicTileAnalysis &analyzer);
7272

73-
typedef std::pair<mlir::Operation *, Port> PhysPort;
73+
typedef std::pair<TileID, Port> PhysPort;
7474

7575
bool findPathToDest(SwitchSettings settings, TileID currTile,
7676
WireBundle currDestBundle, int currDestChannel,

include/aie/Dialect/AIE/Transforms/AIEPathFinder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class DynamicTileAnalysis {
254254
int getMaxRow() const { return maxRow; }
255255

256256
TileOp getTile(mlir::OpBuilder &builder, int col, int row);
257+
TileOp getTile(mlir::OpBuilder &builder, const TileID &tileId);
257258

258259
SwitchboxOp getSwitchbox(mlir::OpBuilder &builder, int col, int row);
259260

0 commit comments

Comments
 (0)