[Openmp-commits] [PATCH] D64080: [OPENMP]Make __kmpc_push_tripcount thread safe.
Alexey Bataev via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 2 15:19:16 PDT 2019
ABataev added a comment.
In D64080#1567327 <https://reviews.llvm.org/D64080#1567327>, @grokos wrote:
> A long time ago we had identified the problem with the loop trip count and if I recall correctly the proposed solution was to store the trip count per OpenMP task. The fix would be implemented in libomp because libomptarget has no notion of tasks.
> @AlexEichenberger Can you confirm whether or not this is the case? I may confuse this with something else...
The patch does exactly what you said: stores tripcount per task, but in the libomptarget, not libomp. When it will be implemented in libomp, we could remove this code. But we need fully functional implementation now, not in the future.
Plus, libomptarget already communicates with libomp using kmpc_omp_taskwait,though incorrectly. It uses 0 as thread ID always, though it must use real OpenMP thread ID, not 0. I'm going to fix this in the next patch.
CHANGES SINCE LAST ACTION
More information about the Openmp-commits