This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Set RequiresFullRuntime false in SPMDization
ClosedPublic

Authored by ggeorgakoudis on Jul 7 2021, 8:18 AM.

Details

Summary

SPMDization in D102307 does not change the RequiresFullRuntime argument of kmpc_target_init/deinit calls. However, the constraints of SPMDization detection for converting a target region to SPMD mode should guarantee that the region does not require full runtime support. Hence, this patch sets RequiresFullRuntime to false for improved execution performance.

Diff Detail

Event Timeline

ggeorgakoudis created this revision.Jul 7 2021, 8:18 AM
ggeorgakoudis requested review of this revision.Jul 7 2021, 8:18 AM
Herald added a project: Restricted Project. · View Herald Transcript
jdoerfert added inline comments.Jul 7 2021, 8:29 AM
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
2811–2819

You need this callback stuff for the full-runtime flag too

Fix to call registerSimplificationCallback

ggeorgakoudis marked an inline comment as done.Jul 7 2021, 11:02 AM
ggeorgakoudis added inline comments.
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
2811–2819

Fixed

There should be test changes.

jdoerfert added inline comments.Jul 7 2021, 12:07 PM
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
2819

The callback you need here should return "the opposite" of IsSPMDModeSimplifyCB.

ggeorgakoudis marked an inline comment as done.

Fix the simplification callback

ggeorgakoudis marked an inline comment as done.Jul 7 2021, 2:05 PM
ggeorgakoudis edited the summary of this revision. (Show Details)Jul 8 2021, 7:45 AM

All good, just update the spmd-zation tests (with the script)

jdoerfert accepted this revision.Jul 19 2021, 12:42 PM

LG, one minor thing below.

llvm/lib/Transforms/IPO/OpenMPOpt.cpp
2784
This revision is now accepted and ready to land.Jul 19 2021, 12:42 PM

Two test fail, check with upstream again wrt. remarks. Should not require a change to the remarks, even though an update might "improve" the check lines.

Rebase, fix for comments, update test

ggeorgakoudis marked an inline comment as done.Jul 19 2021, 4:55 PM

Fixing remark tests

Fixing remark tests

Fix remark tests

This revision was landed with ongoing or failed builds.Jul 20 2021, 9:55 AM
This revision was automatically updated to reflect the committed changes.