Page MenuHomePhabricator

Added support for OpenMP 4.5 simd modifier of the schedule clause of the OpenMP loop construct

Authored by AndreyChurbanov on Apr 3 2017, 8:16 AM.



In addition to schedule(simd:static) inplemented earlier (kmp_sch_static_balanced_chunked = 45) added new support for schedule(simd:guided) and schedule(simd:runtime):

kmp_sch_guided_simd = 46, /**< guided with chunk adjustment */
kmp_sch_runtime_simd = 47, /**< runtime with chunk adjustment */

These three schedules cannot be covered solely by compiler or runtime. New schedule types introduced so that the runtime library can get needed information from the compiler on the simd length (for runtime schedule) or on the need of chunk size adjustment (for guided schedule).

For simd:runtime the compiler should provide the simd length in chunk parameter (unused for non-simd schedule).

For simd:guided the runtime library should adjust the size of each chunk to be multiple of the given chunk size provided by compiler (which in turn should be multiple of simd length).

Diff Detail


Event Timeline

AndreyChurbanov created this revision.Apr 3 2017, 8:16 AM
jlpeyton added inline comments.Apr 5 2017, 2:28 PM
361–362 ↗(On Diff #93861)

Can we add an array of schedules to iterate over:
{kmp_sch_guided_simd, kmp_sch_static_balanced_chunked} and then send those in to run_loop_64 and run_loop_32?

Fixed initial patch to work on more cases of setting simd schedules - specifying schedule(simd:runtime), then use environment variable or API to set the schedule.

Added more tests to check various ways of setting the schedule.

Fixed minor bug in kmp_runtime.cpp when chunk=0 could be propagated into dispatcher code.

jlpeyton accepted this revision.Jun 1 2017, 1:52 PM


This revision is now accepted and ready to land.Jun 1 2017, 1:52 PM
This revision was automatically updated to reflect the committed changes.