Hybrid BFS Algorithm for Heterogeneous Processor Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional Breadth-First Search (BFS) algorithms on heterogeneous processors lack adaptability and efficiency due to limitations in locality and memory access patterns, particularly on GPUs, and do not effectively utilize the capabilities of Accelerated Processing Units (APUs) for graph applications.
Innovation Solution
A hybrid BFS algorithm that dynamically switches between top-down and bottom-up approaches based on graph characteristics and traversal information, utilizing the appropriate processing unit for each iteration, thereby optimizing performance by leveraging the strengths of both algorithms and platforms.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If top-down BFS algorithm is used on GPU, then BFS traversal can be performed, but locality is poor and memory access patterns are irregular
Solution Approach 1:
The patent dynamically switches between top-down and bottom-up BFS algorithms based on graph characteristics and traversal progress. The system monitors the number of visited vertices and automatically transitions from top-down to bottom-up algorithm when beneficial, optimizing memory access patterns and locality adaptively during execution.
Solution Approach 2:
The patent changes the algorithmic approach parameter from fixed top-down to variable selection between top-down and bottom-up based on graph properties. By adjusting this parameter dynamically, the system optimizes memory access patterns and locality to match the current state of BFS traversal.
2Ease of manufacture
If bottom-up BFS algorithm is used on GPU, then memory access patterns improve, but load imbalance occurs
Solution Approach 1:
The system dynamically monitors load balance metrics during bottom-up BFS execution and automatically switches back to top-down algorithm when load imbalance becomes excessive. This dynamic adjustment ensures both memory access efficiency and load balance are maintained optimally throughout the traversal.
3Device complexity
If homogeneous processors (CPU or GPU) are used for BFS, then algorithm execution is simple, but heterogeneous capabilities are not utilized
Solution Approach 1:
The patent implements a universal BFS execution framework that can operate on both CPU and GPU processors, selecting the appropriate processor type based on graph characteristics. The system leverages heterogeneous capabilities by choosing between CPU and GPU execution contexts, maximizing the utilization of available processing resources.
4Adaptability or versatility
If APU is used for BFS, then both CPU and GPU capabilities are available, but optimal processor selection and algorithm partitioning are complex
Solution Approach 1:
The system implements feedback mechanisms that monitor graph characteristics, traversal progress, and performance metrics to automatically determine the optimal processor (CPU or GPU) and algorithm (top-down or bottom-up) for each BFS iteration. This feedback-driven approach simplifies the complexity of processor selection by using real-time performance data.
Solution Approach 2:
The patent dynamically partitions the BFS algorithm between CPU and GPU based on real-time conditions, transitioning between processors and algorithms as needed. This dynamic partitioning automates the complex decision-making process, allowing the system to leverage APU capabilities without manual intervention.
Data Source
AI summary
A method and apparatus for performing a top-down Breadth-First Search (BFS) includes performing a first determination whether to convert to a bottom-up BFS. A second determination is performed whether to convert to the bottom-up BFS, based upon the first determination being positive. The bottom-up BFS is performed, based upon the first determination and the second determination being positive. A third determination is made whether to convert from the bottom-up BFS to the top-down BFS, based upon the third determination being positive.


