Stanford University

Stanford University

Regent is a language developed as part of the Legion research project that facilitates implicit task-based parallelism and optimized code for GPUs.

Overview of Regent

Regent is a programming language designed for implicit task-based parallelism. It is part of the Legion research project and aims to automatically discover parallelism in programs composed of tasks. Regent includes a self-installer that downloads Terra and builds the Regent compiler. This language supports various optimizations, many of which are automatic, to facilitate the writing of optimized code for both NVIDIA and AMD GPUs.

File I/O and Interoperability in Regent

Regent supports file I/O via the HDF5 file format, enabling efficient data handling. The language also allows Regent code to call C functions using Terra’s foreign function interface (FFI), enhancing interoperability. Terra-style metaprogramming is another feature of Regent, providing more flexibility during development.

Compiler and Development Tools for Regent

Regent includes a frontend interpreter that can be run with the command ./regent.py <script>. Additionally, Regent syntax highlighting modes are available for popular text editors such as Emacs and Vim, facilitating a better development experience. These tools and features combine to create a versatile development environment for programmers.

Parallelism and Partitioning in Regent

Regent supports partitions, which subdivide regions into subregions to enable parallelism. The language offers a sub-language of partition operators, including equal, by field, image, preimage, union, intersection, and difference. Regent also supports the creation of cross products, specifying the cartesian product of two or more partitions. Constraints can be used to specify relationships between regions, ensuring a robust means to manage data dependencies.

Region and Index Management in Regent

Regent supports the creation of regions, which are the cross-product between an index space and a field space. There are 10 built-in index types available, such as ptr, int1d, int2d, int3d, and so forth up to int9d. Additionally, Regent allows for the creation of custom index types, providing developers with various options for managing and structuring data.

Companies similar to Stanford University