This is an archive of the discontinued LLVM Phabricator instance.

Add recursive task scheduling strategy to taskloop implementation
ClosedPublic

Authored by jlpeyton on Jul 11 2017, 1:38 PM.

Details

Summary

Patch by Andrey Churbanov

Taskloop implementation is extended by using recursive task scheduling.
Envirable KMP_TASKLOOP_MIN_TASKS added as a manual threshold for the user to switch from recursive to linear tasks scheduling.

Details:

  • The calculations for the loop parameters are moved from __kmp_taskloop_linear upper level
  • Initial calculation is done in the __kmpc_taskloop, further range splitting is done in the __kmp_taskloop_recur.
  • Added threshold to switch from recursive to linear tasks scheduling;
  • One half of split range is scheduled as an internal task which just moves sub-range parameters to the stealing thread that continues recursive scheduling (if number of tasks still enough), the other half is processed recursively;
  • Internal task duplication routine fixed to assign parent task, that was not needed when all tasks were scheduled by same thread, but is needed now.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton created this revision.Jul 11 2017, 1:38 PM
This revision is now accepted and ready to land.Jul 17 2017, 10:19 AM
This revision was automatically updated to reflect the committed changes.