-
Notifications
You must be signed in to change notification settings - Fork 430
RR Graph - Cut interposer crossing wires #3342
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
base: master
Are you sure you want to change the base?
Conversation
95dee19 to
9b6566b
Compare
AlexandreSinger
left a comment
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.
Looks good. Some comments.
d4485f3 to
f007bde
Compare
amin1377
left a comment
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.
Thanks, Amir!
| RRNodeId src_node = rr_graph.edge_src_node(edge_id); | ||
| RRNodeId sink_node = rr_graph.edge_sink_node(edge_id); | ||
|
|
||
| // TODO: ignoring ChanZ nodes for now |
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.
Can you elaborate a bit more on why chanz is ignored? My guess is that since this code is focused on the 2.5D architecture, the assumption is that chanz is not stretched across the 2D plane but along the Z-axis, so the interposer line wouldn’t apply to it. If that’s the case, I’d also add an ASSERT_DEBUG here to ensure that x_low == x_high and y_low == y_high.
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.
I haven't thought about 3D architectures that also have interposer cut lines so I'm honestly not sure what should happen to edges to connect to/from chanz nodes. I think this needs further discussions about what it even means to have an architecture like this.
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.
I'd update the comment to say that we don't allow interposers in the Z dimension (z is for die-stacking, and an interposer in a die stacking dimension is not currently manufacturable).
This commit makes the bit mask much more obvious that it should be one-hot encoded.
f007bde to
e9876b3
Compare
soheilshahrouz
left a comment
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.
Thanks Amir!
| } | ||
| } | ||
|
|
||
| void update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(const RRGraphView& rr_graph, const DeviceGrid& grid, RRGraphBuilder& rr_graph_builder, const std::vector<std::pair<RRNodeId, int>>& sg_node_indices) { |
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.
the line is too long
the function name is too long
88f8e82 to
b57b08f
Compare
vaughnbetz
left a comment
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.
Looks good; some commenting upgrades and a few changes suggested.
|
|
||
| /** @brief Removes a given list of RREdgeIds for the RR Graph. | ||
| * This method does not preserve the order of edges. If you're | ||
| * calling it after partition_edges has been called, you need |
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.
"you need to call it again" --> you will need to call partition_edges again
| edge_remapped_.erase(edge_remapped_.begin() + edge_list_end + 1, edge_remapped_.end()); | ||
|
|
||
| VTR_ASSERT(edge_dest_node_.size() == (starting_edge_count - rr_edges_to_remove.size())); | ||
| } |
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.
Should set partitioned = false here
| } | ||
|
|
||
| /** @brief Returns a range of all edges in the RR Graph. | ||
| * This method does not depend on the edges begin correctly |
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.
begin -> being
| /** @brief Adds a batch of edges.*/ | ||
| void alloc_and_load_edges(const t_rr_edge_info_set* rr_edges_to_create); | ||
|
|
||
| /** @brief Removes a given list of RREdgeIds for the RR Graph. |
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.
'for the RR' -> 'from the RR'
'has been called, you need to call it again' -> 'has been called, you need to call partition_edges again'
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.
Probably should say this operation is O(num_edges) in the RR graph, so it should not be called often and edges should be removed in bulk if at all possible.
|
|
||
| int layer = rr_graph.node_layer_low(src_node); | ||
|
|
||
| for (int cut_loc_y : grid.get_horizontal_interposer_cuts()[layer]) { |
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.
Explain this a bit. If the start (drive point) of the src node of the edge is on a different side of the interposer than the sink node of the edge drive point, the edge starts on a piece of wire that should be cut by the interposer. Mark it for removal.
| * @brief Update a CHANY node's bounding box in RRGraph and SpatialLookup entries. | ||
| * This function assumes that the channel node actually crosses the cut location and | ||
| * might not function correctly otherwise. | ||
| * |
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.
comment the params -- there are a lot so good to document.
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.
Could you put an assert in for the channel node crosses the cut location?
| * might not function correctly otherwise. | ||
| * | ||
| * This is a low level function, you should use cut_channel_node that wraps this up in a nicer API. | ||
| */ |
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.
Document params
| if (node_direction == Direction::INC) { | ||
| // Anything to the right of cut_loc_x shouldn't exist | ||
| rr_graph_builder.set_node_coordinates(node, x_low, y_low, cut_loc_x, y_high); | ||
|
|
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.
Add assert that the node crosses the cut location (or just return without doing anything and update the comment).
| #include "rr_spatial_lookup.h" | ||
| #include "vpr_error.h" | ||
| #include "vtr_assert.h" | ||
|
|
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.
Comment what this file is for.
Add an ascii art showing where the interposer boundary is / what wires are cut / where channels are vs. the interposer for the same coordinate (e.g. y).
This PR adds the last piece of functionality for modeling 2.5D architectures in upstream VPR: Actually cutting down the wires and connections that cross between the dice.
I had an issue with code duplication and there are still some functions that look very similar but do different things. I tried my best to keep the duplication to the lowest level functions and have more general higher level functions that wrap them but there's still some remaining. If you have an idea to do this in a better way please let me know.