[Openmp-commits] [PATCH] D113623: [OpenMP][FIX] Pass the num_threads value directly to parallel_51
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 10 15:40:12 PST 2021
jdoerfert created this revision.
jdoerfert added reviewers: jhuber6, ggeorgakoudis, tianshilei1992, grokos, jdenny.
Herald added subscribers: asavonic, guansong, bollu, yaxunl.
jdoerfert requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1.
Herald added projects: clang, OpenMP.
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.
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 44459 bytes
Desc: not available
More information about the Openmp-commits