This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Simplify variable sharing and increase shared memory size
ClosedPublic

Authored by jdoerfert on Jul 10 2021, 5:32 PM.

Details

Summary

In order to avoid malloc/free, up to NUM_SHARED_VARIABLES_IN_SHARED_MEM
(=64) variables are communicated in dedicated shared memory instead. The
simplification does avoid the need for an "init" and requires "deinit"
only if we ever communicate more than NUM_SHARED_VARIABLES_IN_SHARED_MEM
variables.

Diff Detail

Event Timeline

jdoerfert created this revision.Jul 10 2021, 5:32 PM
jdoerfert requested review of this revision.Jul 10 2021, 5:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2021, 5:32 PM
Herald added a subscriber: sstefan1. · View Herald Transcript
jdoerfert updated this revision to Diff 357777.Jul 10 2021, 7:08 PM

Fix minor problems

This revision is now accepted and ready to land.Jul 10 2021, 7:32 PM
tianshilei1992 added inline comments.Jul 10 2021, 7:32 PM
openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
158

but I don't like the name…Starting with _ is not a typical LLVM name.

jdoerfert added inline comments.Jul 11 2021, 4:34 PM
openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
158

I will use static and remove the _