Tuesday, January 16, 2018

Legion

"Legion is a data-centric programming model for writing high-performance applications for distributed heterogeneous architectures. Making the programming system aware of the structure of program data gives Legion programs three advantages:
  • User-Specification of Data Properties: Legion provides abstractions for programmers to explicitly declare properties of program data including organization, partitioning, privileges, and coherence. Unlike current programming systems in which these properties are implicitly managed by programmers, Legion makes them explicit and provides the implementation for programmers.
  • Automated Mechanisms: current programming models require developers to explicitly specify parallelism and issue data movement operations. Both responsibilities can easily lead to the introduction of bugs in complex applications. By understanding the structure of program data and how it is used, Legion can implicitly extract parallelism and issue the necessary data movement operations in accordance with the application-specified data properties, thereby removing a significant burden from the programmer.
  • User-Controlled Mapping: by providing abstractions for representing both tasks and data, Legion makes it easy to describe how to map applications onto different architectures. Legion provides a mapping interface which gives programmers direct control over all the details of how an application is mapped and executed. Furthermore, Legion’s understanding of program data makes the mapping process orthogonal to correctness. This simplifies program performance tuning and enables easy porting of applications to new architectures.
Applications targeting Legion have the option of either being written in the Regent programming language or written directly to the Legion C++ runtime interface. Applications written in Regent are compiled to LLVM (and call a C wrapper for the C++ runtime API).

The Legion runtime system implements the Legion programming model and supports all the necessary API calls for writing Legion applications. Mappers are special C++ objects that are built on top of the Legion mapping interface which is queried by the Legion runtime system to make all mapping decisions when executing a Legion program. Applications can either chose to use the default Legion mapper or write custom mappers for higher performance.

The Legion runtime system sits on top of a low-level runtime interface called Realm. The Realm interface is designed to provide portability to the entire Legion system by providing primitives which can be implemented on a wide range of architectures. Realm is a modular runtime and supports a variety of underlying technologies for portability across a variety of machines, including GASNet for high-performance networking on a variety of interconnects and CUDA for GPUs."

http://legion.stanford.edu/overview/index.html

No comments:

Post a Comment