This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Implement a unified kernel entry function
ClosedPublic

Authored by jhuber6 on Jun 24 2022, 12:03 PM.

Details

Summary

This patch implements a unified kernel entry function that will be
targeted from both teams and non-teams clauses. We introduce a new
interface and make the old functions call in using the new one. A
following patch will include the necessary changes to Clang to call
these new functions instead.

Diff Detail

Event Timeline

jhuber6 created this revision.Jun 24 2022, 12:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 12:03 PM
jhuber6 requested review of this revision.Jun 24 2022, 12:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 12:03 PM
jdoerfert added inline comments.Jun 29 2022, 6:58 AM
openmp/libomptarget/src/interface.cpp
384

Documentation needed for these special values.

I like this:

static_assert(sizeof(__tgt_kernel_arguments) == XXX);

It gives you some confidence that nobody fiddles with it.

jhuber6 updated this revision to Diff 441047.Jun 29 2022, 9:27 AM

Address comments and add version field.

jhuber6 updated this revision to Diff 443010.Jul 7 2022, 11:48 AM

Moving version field to the arguments struct.

I like this:

static_assert(sizeof(__tgt_kernel_arguments) == XXX);

It gives you some confidence that nobody fiddles with it.

Added in D128817.

This revision is now accepted and ready to land.Jul 8 2022, 9:16 AM
This revision was landed with ongoing or failed builds.Jul 8 2022, 11:44 AM
This revision was automatically updated to reflect the committed changes.