Optimizations on Graph-Level for Domain Specific Computations in Julia and Application to QED
A. Reinhard 1 2 3 , S. Ehrig 1 2 , R. Widera 1 , M. Bussmann 2 , U. Hernandez Acosta 1 2 · 2025
Read Optimizations on Graph-Level for Domain Specific Computations in Julia and Application to QED by A. Reinhard 1 2 3 , S. Ehrig 1 2 , R. Widera 1 , M. Bussmann 2 , U. Hernandez Acosta 1 2 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-19456.txt.
Introduction
Anton Reinhard and four co-authors present a Julia tool that splits big science problems into a graph of small jobs. Each part may suit a different kind of hardware. Good scheduling must also weigh how jobs run in parallel, which jobs wait on others, and how fast data moves. Graphs with no loops capture that structure well.
The tool writes scheduled, compiled code on its own and can adjust it as things change. Adding facts about the science to the graph unlocks gains that plain schedulers miss. As a test case, the team computes values for particle scattering in quantum electrodynamics, where the parts differ sharply in what they need.
Catalog record
| CREATOR | A. Reinhard 1 2 3 , S. Ehrig 1 2 , R. Widera 1 , M. Bussmann 2 , U. Hernandez Acosta 1 2 |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 71 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-19456
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Optimizations on Graph-Level for Domain Specific Computations in Julia and Application to QED A. Reinhard 1 2 3 , S. Ehrig 1 2 , R. Widera 1 , M. Bussmann 2 , U. Hernandez Acosta 1 2 Abstract Complex computational problems in science often consist of smaller parts that can have largely distinct compute requirements from one another. For optimal efficiency, analyzing each subtask and scheduling it on the best-suited hardware would be necessary. Other considerations must be taken into account, too, such as parallelism, dependencies between different subtasks, and data transfer speeds between devices. To achieve this, directed acyclic graphs are often employed to represent these problems and enable utilizing as much hardware as possible on a given machine. In this paper, we present a software framework written in Julia capable of automatically and dynamically producing statically scheduled and compiled code. We lay theoretical foundations and add domain-specific information about the computation to the existing concepts of DAG scheduling, enabling optimizations that would otherwise be impossible. To illustrate the theory we implement an example application: the computation of matrix elements for scattering processes with many external particles in quantum electrodynamics. Keywords : Directed Acyclic Graph, Optimization, Code Generation, Julia, HPC, QED, Heterogeneity I Introduction Optimizing the performance of high-performance code is challenging because many factors influence it. On the hardware side, these include caching, thread counts, and hyper-threading abilities, the available microarchitecture, hardware accelerators, and the data interconnection speed between CPUs and the accelerators [ 46 ] . However, on the tooling side, many performance-relevant choices also exist, such as compiler options or libraries for low-level operations and GPU usage [ 42 , 47 ] . Lastly, software choices such as memory layouts [ 19 ] , design, and language influence the performance. The combination of the already large optimization space on the software side and the wide variety of hardware makes it very difficult to solve problems efficiently while maintaining portability (especially performance-portability) at the same time. Compilers are very good at optimizing small pieces of code to near-optimal levels, but are constrained by guarantees and a lack of domain knowledge about what is being computed. Therefore, higher-level optimizations are often out of scope for compilers because they rely on properties that can not generally be assumed, or because they involve too large parts of the code base. Some domain-specific languages (DSL) get around this by essentially hard-coding paths of optimization into their design. However, by their nature, they are not portable to other domains and require large amounts of implementation work on their own. In HPC systems and software, multiple layers of optimization are commonly available. The two polar ends of the spectrum are compilers, which operate at the lowest level of abstraction, i.e., closest to the physical hardware, and frameworks like MPI [ 15 , 36 ] , which operate at a very high level of abstraction. Engines like this can target large clusters and parallelize effectively, but are unable to optimize the program flow itself because they lack meta-information about what is being executed. Furthermore, for workflow engines, the relevant task kernels are often complex and comparatively long-running themselves, making the overhead of dynamic scheduling negligible in most cases. To reconcile these two extremes, we propose an approach representing computational problems as DAGs, made up of nodes carrying compute kernels to allow the targeting of large compute systems. On top of this well-known design, we propose an optimization scheme on the DAG level by analyzing and muting the DAG structure. The required domain knowledge about the problem is implicitly given by the DAG itself, and can be further fine-tuned by assigning attributes to nodes to allow term rewriting. Importantly, this approach does not aim to replace the optimizations of compilers, but work with and benefit them. Frameworks and libraries targeting similar goals to ours have been proposed before. StarPU is a runtime system to dynamically schedule tasks on heterogeneous systems, aiming to provide a unified programming interface for multi-core and GPU programming [ 3 ] . However, it still requires separate implementations of the tasks themselves to be provided for all target architectures. It also does not optimize the graph on its own. Another is SuperGlue, which uses a stronger but similar version of a DAG representation to encode both data dependencies and concurrency exclusions [ 40 ] . It uses a fully dynamic scheduling approach to scale problems efficiently to many CPU cores. Much previous work has also been done on scheduling DAG representations of large computing jobs. We currently target heterogeneous single-node devices, such as a typical HPC cluster node with 2 CPU cores and one or several GPUs. However, most research in this domain targets either low-level scheduling in the backends of compilers [ 28 , 23 , 44 , 35 ] , or scheduling for large multi-node programs [ 9 ] . In contrast, the tasks we schedule are large compared to the ones a typical compiler schedules, but small for a typical high-performance cluster. For example, a task in our framework might be a small matrix multiplication, while the compiler would see the underlying floating-point additions and multiplications. On the other hand, a framework at a higher level of abstraction might see an entire timestep of a simulation as one task. Furthermore, an abundance of scheduling algorithms exist to solve or approximate solutions to scheduling problems. Some target single-threaded execution [ 23 ] , some target multi-threaded but homogeneous execution [ 29 , 14 , 26 , 10 ] , and some large-scale heterogeneous systems [ 41 , 9 , 21 , 43 , 25 , 37 , 24 ] . Categorization also exists between dynamic and static scheduling, where dynamic schedulers handle graphs whose topology or weights may change during execution [ 45 , 37 , 32 ] , in contrast to static schedulers, which can rely on an unchanging graph [ 27 , 9 ] . To solve these many constraints for problems with often intractable optimal solutions [ 14 ] , neural-net-based algorithms have been proposed in recent years, both for scheduling and also optimization [ 17 ] . Since our proposed structure is based on taking advantage of domain-specific knowledge, it is also closely related to domain-specific languages. I-A Choice of Language To implement our approach, some requirements must be met by the underlying infrastructure, first and foremost the language. For easy adoption and quick implementations and subsequent extensions, the language of choice should provide a high degree of expressiveness. The barrier-of-entry and time-to-first-simulation should be as low as possible. Next, to implement the translation of a graph-level representation to executable machine code, the language must provide extensive capabilities for meta-programming and code generation. For ease-of-use it is also beneficial if no switch of tools or language is necessary to run the generated code. Furthermore, the language should be able to target various architectures, most importantly GPUs of the main vendors. In the best case, the user can write completely hardware agnostic code that runs seamlessly on any given hardware. Since we want to target scientific computing and high performance codes, the performance of the language must also be high and portable to the target architectures.