This is an archive of the discontinued LLVM Phabricator instance.

Fixed nonmonotonic dynamic schedule for case when #threads > #chunks in a loop.
ClosedPublic

Authored by AndreyChurbanov on Nov 26 2019, 5:14 AM.

Details

Summary

The nonmonotonic dynamic schedule is internally mapped to static_steal schedule.
When #threads > #chunks stealing is not possible (at most one chunk per thread), so
library mistakenly did fallback to static_balanced which does not honor chunk size.
This patch changes the fallback from static to dynamic_chunked.

Diff Detail

Event Timeline

AndreyChurbanov edited the summary of this revision. (Show Details)Nov 26 2019, 5:15 AM
jdoerfert accepted this revision.Nov 26 2019, 9:21 PM

LGTM.

openmp/runtime/src/kmp_dispatch.cpp
389

Nit: no braces.

This revision is now accepted and ready to land.Nov 26 2019, 9:21 PM
This revision was automatically updated to reflect the committed changes.