Directive-Based Annotations for Parallelizing Sequential Python Code: Methodology and Prototype
摘要
The Cloud-Edge Continuum shows a high level of complexity, which needs to be constantly addressed especially in the management and deployment of distributed applications, starting from sequential code. This paper presents a novel methodology and prototype for automatically parallelizing sequential Python programs that leverage a directive-based model (annotations/metadata). This model transforms sequential source code into an enriched execution graph for distributed optimization. The system leverages specialized analytical performance models that quantify computational and communication costs (MIPS, bandwidth, latency) to guide annotation choices and model system bottlenecks. A HEFT-inspired scheduling engine then uses this added metadata and performance information to assign tasks to the heterogeneous Cloud-Edge devices. The directives translate into strict execution and placement constraints, enabling the scheduler to optimize for metrics like makespan, energy consumption, and memory use. We validate the practical viability of this non-intrusive, end-to-end system through a functional prototype, demonstrating a transparent pipeline for optimizing distributed execution planning directly from the Python codebase.