When we pick state 0 to initialize state but thread N is going to be the
"main thread", in generic mode, we would require extra synchronization.
Instead, we should pick the main thread to initialize state in generic
mode and any thread in SPMD mode.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/libomptarget/DeviceRTL/include/Mapping.h | ||
---|---|---|
46 | nit: in OpenMP term, it is "initial thread". |
openmp/libomptarget/DeviceRTL/include/Mapping.h | ||
---|---|---|
46 | But in generic mode the initial thread, or main thread (thread 0), changes between parallel level 0 and 1. we used to use the one for level 1, now the one for level 0. As this is really asking "should I use this thread for initialization" and not "is this the initial thread (in some unspecified level)" I think the name fits. |
openmp/libomptarget/DeviceRTL/include/Mapping.h | ||
---|---|---|
46 | I'm rewording. |
nit: in OpenMP term, it is "initial thread".