This is an archive of the discontinued LLVM Phabricator instance.

[OpenMPOpt] Expand SPMDization with guarding
Needs ReviewPublic

Authored by ggeorgakoudis on Jul 24 2021, 6:19 AM.

Details

Summary

This patch expands SPMDization by guarding code regions that should be executed only by the main thread. It defines an SPMD guarded execution mode where the main thread executes guarded regions and synchronizes with worker threads using simple barriers to ensure that values are updated. Given it is possible that the same code region executes both from SPMD or SPMDized guarded execution mode, the patch creates a non-guarded version of the region and a flag to guard or not that is managed by the runtime.

TODO: tests, depends on simplification callback fixes

Diff Detail

Event Timeline

ggeorgakoudis created this revision.Jul 24 2021, 6:19 AM
ggeorgakoudis requested review of this revision.Jul 24 2021, 6:19 AM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald Transcript
ggeorgakoudis edited the summary of this revision. (Show Details)Jul 24 2021, 6:33 AM
ggeorgakoudis retitled this revision from [OpenMPOpt][WIP] Expand SPMDIzation with guarding to [OpenMPOpt][WIP] Expand SPMDization with guarding.Jul 24 2021, 6:47 AM

Update for sensible access to __kmpc_is_spmd_guarded_exec_mode

ggeorgakoudis retitled this revision from [OpenMPOpt][WIP] Expand SPMDization with guarding to [OpenMPOpt] Expand SPMDization with guarding.Jul 24 2021, 7:51 AM
ggeorgakoudis edited the summary of this revision. (Show Details)
ormris removed a subscriber: ormris.Jan 24 2022, 11:50 AM