This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP][NVPTX] Lightweight runtime support for SPMD mode.
ClosedPublic

Authored by ABataev on Aug 24 2018, 10:08 AM.

Details

Summary

Implemented simple and lightweight runtime support for SPMD mode-based
constructs. It adds support for L2 sequential parallelism wihtout full
runtime support. Also, patch fixes some use cases for
uninitialized|lightweight runtime.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev created this revision.Aug 24 2018, 10:08 AM
This revision is now accepted and ready to land.Aug 24 2018, 10:25 AM
Hahnfeld accepted this revision.Aug 24 2018, 10:41 AM

Great that we don't need any additional entry points. I suppose LLVM is just optimizing away unneeded code when the runtime is inlined?

Great that we don't need any additional entry points. I suppose LLVM is just optimizing away unneeded code when the runtime is inlined?

I hope so. We can check later if we can optimize it further.

This revision was automatically updated to reflect the committed changes.
Hahnfeld added inline comments.Sep 3 2018, 9:54 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
192–200

Again looking at this code: Shouldn't all threads return, ie should it be outside of if (threadId == 0)?

ABataev added inline comments.Sep 3 2018, 9:59 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
192–200

You're right, that was an original intention. Could commit a quick fix?

Hahnfeld added inline comments.Sep 3 2018, 10:01 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
192–200

Yes please.

ABataev added inline comments.Sep 3 2018, 10:03 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
192–200

I meant could you commit the fix? :) I don't have an access to my laptop.

Hahnfeld added inline comments.Sep 3 2018, 10:26 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
192–200

Ah, done in r341328. Thanks for your quick replies!

Hahnfeld added inline comments.Sep 3 2018, 10:33 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/loop.cu
146–167

Has this change related to kmp_sched_static_balanced_chunk slipped into this patch on commit? I can't find it in the original review.

(No need to revert, just curious...)

ABataev added inline comments.Sep 3 2018, 10:43 AM
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/loop.cu
146–167

Yes, during testing I found some inconsistency between clang and NVPTX libomp abd fixed all of them in a single patch.