Page MenuHomePhabricator

[OpenMP][FIX] Pass the num_threads value directly to parallel_51

Authored by jdoerfert on Nov 10 2021, 3:40 PM.



The problem with the old scheme is that we would need to keep track of
the "next region" and reset the num_threads value after it. The new RT
doesn't do it and an assertion is triggered. The old RT doesn't do it
either, I haven't tested it but I assume a num_threads clause might
impact multiple parallel regions "accidentally". Further, in SPMD mode
num_threads was simply ignored, for some reason beyond me.

In any case, parallel_51 is designed to take the clause value directly,
so let's do that instead.

Diff Detail

Event Timeline

jdoerfert created this revision.Nov 10 2021, 3:40 PM
jdoerfert requested review of this revision.Nov 10 2021, 3:40 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 10 2021, 3:40 PM
tianshilei1992 accepted this revision.Nov 11 2021, 9:08 AM

I think this should be the right direction. LGTM. @grokos WDYT?

This revision is now accepted and ready to land.Nov 11 2021, 9:08 AM