Abstract
Recent technological advances have contributed to the rapid increase in algorithmic complexity of applications, ranging from signal processing to autonomous systems. To control this complexity and endow heterogeneous computing systems with autonomous programming and optimization capabilities, we propose a unified, end-to-end, programmable graph representation learning (PGL) framework that mines the complexity of high-level programs down to low-level virtual machine intermediate representation, extracts specific computational patterns, and predicts which code segments run best on a core in heterogeneous hardware. PGL extracts multifractal features from code graphs and exploits graph representation learning strategies for automatic parallelization and correct assignment to heterogeneous processors. The comprehensive evaluation of PGL on existing and emerging complex software demonstrates a 6.42x and 2.02x speedup compared to thread-based execution and state-of-the-art techniques, respectively. Our PGL framework leads to higher processing efficiency, which is crucial for future AI and high-performance computing applications such as autonomous vehicles and machine vision.
Introduction: The Challenge of Heterogeneous Complexity
Modern computing systems are increasingly heterogeneous, integrating diverse processing units like CPUs, GPUs, and FPGAs to meet the demands of complex AI and autonomous applications. However, this diversity introduces a significant challenge: the optimal mapping of software tasks to hardware resources. Traditional compiler heuristics, often based on expert-defined rules, struggle to navigate the vast optimization space of modern workloads. Existing machine learning approaches frequently fail to capture the deep structural patterns of code, such as nested loops or recursive calls, which are critical for performance.
The PGL Framework: Mapping the Fractal Heart of Code
To bridge the gap between high-level software and low-level hardware efficiency, we introduce the Programmable Graph representation Learning (PGL) framework. PGL treats code as a dynamic graph, capturing real-world data dependencies and control flows at the LLVM Intermediate Representation (IR) level.
The core innovation of PGL lies in its use of multifractal analysis. Just as natural structures exhibit self-similarity across scales, code structures like loops (mesh-like) and recursions (tree-like) possess unique "fractal" signatures. By extracting these multifractal features, PGL quantifies the inherent complexity of code segments. The framework then employs a Graph Autoencoder (GAE) for unsupervised partitioning of instructions into kernels, minimizing communication overhead. Finally, a Graph Neural Network (GNN) predicts the optimal hardware target for each kernel with high precision.
Experimental Evaluation and Key Insights
We evaluated PGL across 17 diverse real-world applications, including DNA sequencing and neural networks, on a simulated heterogeneous system.
Performance Benchmarks
- Massive Speedups: PGL achieved a 6.42x speedup compared to standard thread-based parallel programming and a 2.02x speedup over state-of-the-art frameworks like Aladdin.
- High Accuracy: The framework predicted the correct hardware mapping with 91.5% to 93.8% accuracy across NVIDIA and AMD-based datasets, consistently outperforming other ML models like DeepTune and ProGraML.
- Efficiency in Partitioning: Compared to standard graph partitioning (like METIS), PGL’s GAE-based approach was significantly better at grouping instructions to minimize communication overhead.
Key Insights
- Code has a "Fractal" Signature: Multifractal analysis can uniquely identify computational intensity without full execution, distinguishing between mesh-like loops and tree-like recursions.
- The Power-Law of Performance: A universal power-law relationship exists between a graph’s multifractal properties and system-level metrics, making performance in complex systems more predictable than previously thought.
Conclusion and Future Directions
PGL represents a significant step toward autonomous, end-to-end programmable computing. While the framework excels at optimizing complex workloads, challenges remain regarding the overhead for small code segments and the ambiguity of random memory accesses. Future work will focus on "on-the-fly" graph construction and improved handling of pointer-based dependencies to broaden the framework's applicability across diverse programming languages and real-time systems.
Summary updated