PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Improve OpenMP offloading compatibility with versions < 5.0

Open sergisiso opened this issue 1 year ago • 0 comments

The "omp loop" construct that we use for OpenMP offloading is a feature introduced in OpenMP 5 and is not available on all the compilers I attempted to use for OpenMP offloading in different platforms. When it is not supported I had to update the directive to the OpenMP 4 equivalent: "omp teams distribute parallel do". PSyclone should allow to choose which version the user wants to generate.

For the transformation we have taken the approach of just needing an additional attribute/option to specify the kind of directive we are inserting.

For the directive itself we are currently explicit in what we are generating, so we need a OMPTeamsDistributeParalleDoDirective. To have good performance this directive should support (or inherit) the collapse clause functionality.

sergisiso avatar Aug 09 '22 07:08 sergisiso