|
5 | 5 | See LICENSE in the root of the repository for full licensing details. |
6 | 6 | --> |
7 | 7 |
|
8 | | -# PSyTran: tools for automating OpenACC GPU porting efforts using PSyclone |
| 8 | +# PSyTran: tools for PSyclone transformation scripting |
9 | 9 |
|
10 | 10 | ## Introduction |
11 | 11 |
|
12 | 12 | Before introducing PSyTran, we should introduce |
13 | | -[PSyclone](https://github.com/stfc/PSyclone). PSyclone is a domain-specific compiler and |
14 | | -code transformation tool for earth system codes written in Fortran. In code |
15 | | -transformation mode (which is of main interest here), PSyclone can be used to read in |
16 | | -Fortran source code, along with a user-defined *transformation script* (written in |
17 | | -Python), which describes modifications to be made to the source code. With these two |
18 | | -ingredients, PSyclone converts the source code to its internal *intermediate |
19 | | -representation*, applies the transformations, and then writes out the modified code. |
20 | | - |
21 | | -One key example of a transformation to be applied to the input code is to insert |
22 | | -[OpenACC](https://www.openacc.org) directives and clauses. Compiled under |
23 | | -[NVHPC](https://developer.nvidia.com/hpc-sdk), the OpenACC syntax tells the compiler how |
24 | | -to parallelise the code on Nvidia GPUs. This is the transformation of primary interest |
25 | | -as far as PSyTran goes. |
26 | | - |
27 | | -PSyTran is a Python package which provides various helper functions for PSyclone, |
28 | | -particularly with regards to writing transformation scripts for OpenACC GPU porting. |
| 13 | +[PSyclone](https://github.com/stfc/PSyclone). PSyclone is a domain-specific |
| 14 | +compiler and code transformation tool for earth system codes written in Fortran. |
| 15 | +In code transformation mode (which is of main interest here), PSyclone can be |
| 16 | +used to read in Fortran source code, along with a user-defined |
| 17 | +*transformation script* (written in Python), which describes modifications to be |
| 18 | +made to the source code. With these two ingredients, PSyclone converts the |
| 19 | +source code to its internal *intermediate representation*, applies the |
| 20 | +transformations, and then writes out the modified code. |
| 21 | + |
| 22 | +Key examples of transformations to be applied to the input code are to |
| 23 | +insert [OpenMP](https://www.openmp.org) and [OpenACC](https://www.openacc.org) |
| 24 | +directives and clauses, providing instructions to compilers on how to |
| 25 | +distribute work in parallel for CPU or GPU. PSyclone offers the ability to |
| 26 | +inject these compiler directives into source code as a transformation. |
| 27 | + |
| 28 | +The transformations possible with PSyclone aren't limited to inserting compiler |
| 29 | +directives. From chunking loops to inlining routines, PSyclone has an enormous |
| 30 | +selection of transformations, which are all |
| 31 | +[documented here](https://psyclone.readthedocs.io/en/stable/transformations.html). |
| 32 | + |
| 33 | +PSyTran is a Python package which provides various helper functions for using |
| 34 | +PSyclone, most notably for, but not limited to, writing transformation scripts |
| 35 | +for inserting OpenACC and OpenMP directives and clauses. |
| 36 | + |
29 | 37 | Amongst other things, PSyTran provides functionality for: |
30 | 38 | * simplifying tree traversal in PSyclone's intermediate representation, |
31 | | - * analysing the structure of loops and loop nests, |
| 39 | + * finding and analysing the structure of loops and loop nests, |
32 | 40 | * applying OpenACC `kernels` and `loop` directives, |
33 | 41 | * applying OpenACC clauses to `loop` directives, |
| 42 | + * applying OpenMP directives, |
34 | 43 | * querying `Node` types. |
35 | 44 |
|
36 | 45 | ## General user instructions |
37 | 46 |
|
38 | | -Instructions for installing PSyTran and building and viewing its documentation may be found on the [Wiki page](https://github.com/MetOffice/psytran/wiki#general-users). |
| 47 | +Instructions for installing PSyTran and building and viewing its documentation |
| 48 | +may be found on the [Wiki page](https://github.com/MetOffice/psytran/wiki#general-users). |
39 | 49 |
|
40 | 50 | ## Developer notes |
41 | 51 |
|
|
0 commit comments