Skip to content
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

Partition based packer #2385

Open
wants to merge 2 commits into
base: openfpga
Choose a base branch
from

Conversation

behnam-rs
Copy link

Description

Our approach combines the benefits of partitioning-based and seed-based packing algorithms (VPR). It consists of two main steps 1) a partitioning step to hierarchically divide the circuit into subcircuits, and 2) a seed-based packing step that clusters all subcircuits concurrently.

An optimal clustering solution should have a low number of clusters, high intra-cluster connections, and low inter-cluster connections. To achieve this, we employ partitioning algorithms designed for hypergraphs, where hyperedges connect more than two vertices. Logic circuits are an example of hypergraphs, with logic blocks as vertices and nets as hyperedges.

The hypergraph partitioning algorithms split the hypergraph into configurable partitions, minimizing interconnecting hyperedges between them. One well-known algorithm for this purpose is hmetis.

To adapt hmetis for molecule clustering in VPR, we split the circuit into partitions such that the number of molecules in each partition is equal to the clb (configurable logic block) capacity. However, packing molecules into a clb has more constraints than just the clb capacity. To address this, we increase the number of molecules in each partition and then use the seed-based packing algorithm inside VPR to pack the molecules within each partition. The molecules in each partition are packed only to the molecules present in that partition.

Related Issue

Motivation and Context

The current packer in VPR employs a greedy algorithm by sorting molecules into a seed array based on a configurable option (--cluster_seed_type). In each iteration, it selects the best unpacked molecule from the seed array, generates a new cluster for it, and then adds other unpacked molecules to this new cluster using a greedy algorithm. However, due to its greedy nature, the algorithm fails to explore the search space effectively, leading to the problem of getting stuck in local minima.

How Has This Been Tested?

Via our bench-marking, this feature bring better QOR.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Aug 31, 2023
@vaughnbetz
Copy link
Contributor

Interesting PR! Can you add QoR data on the VTR, Titan and Koios benchmark suites? See https://docs.verilogtorouting.org/en/latest/README.developers/#evaluating-quality-of-result-qor-changes for a detailed how-to guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants