This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP][NVPTX]Simplify use of the thread_id in full runtime mode, NFC.
AbandonedPublic

Authored by ABataev on May 23 2019, 7:42 AM.

Details

Summary

ThreadId should not be stored in the runtime class, we can get its value
depending on the current parallel level.

Event Timeline

ABataev created this revision.May 23 2019, 7:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2019, 7:42 AM
jdoerfert added inline comments.Jul 9 2019, 11:26 AM
libomptarget/deviceRTLs/nvptx/src/libcall.cu
56

Can another thread change the parallel level while it is cached in the local variable parLevel?

ABataev marked an inline comment as done.Jul 9 2019, 11:37 AM
ABataev added inline comments.
libomptarget/deviceRTLs/nvptx/src/libcall.cu
56

No. The parlevel is per warp and threads in the warp are executed synchronously.

ABataev abandoned this revision.Feb 11 2021, 5:12 AM