Skip to content

Add a new API partition_edges() to RRGraphBuilder #1900

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

Merged
merged 6 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions vpr/src/device/rr_graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ class RRGraphBuilder {
return node_storage_.validate();
}

/** @brief Sorts edge data such that configurable edges appears before
* non-configurable edges. */
inline void partition_edges() {
node_storage_.partition_edges();
}

/** @brief Init per node fan-in data. Should only be called after all edges have
* been allocated.
* @note
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/rr_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ static void build_rr_graph(const t_graph_type graph_type,

//Partition the rr graph edges for efficient access to configurable/non-configurable
//edge subsets. Must be done after RR switches have been allocated
device_ctx.rr_nodes.partition_edges();
device_ctx.rr_graph_builder.partition_edges();

//Save the channel widths for the newly constructed graph
device_ctx.chan_width = nodes_per_chan;
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/rr_graph_uxsdcxx_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
// configurable/non-configurable edge subsets. Must be done after RR
// switches have been allocated.
rr_graph_builder_->mark_edges_as_rr_switch_ids();
rr_nodes_->partition_edges();
rr_graph_builder_->partition_edges();

for (int source_node = 0; source_node < (ssize_t)rr_nodes_->size(); ++source_node) {
int num_edges = rr_nodes_->num_edges(RRNodeId(source_node));
Expand Down