This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][NFCI] Introduce the kernel environment for target regions
AbandonedPublic

Authored by jdoerfert on Nov 3 2021, 1:14 PM.

Details

Summary

This introduces the kernel environment which contains information passed
by the compiler to a GPU kernel. For now it just encapsulated the
ident_t object that we passed explicitly before but we will add more
content, including mutable content, later on.

Diff Detail

Event Timeline

jdoerfert created this revision.Nov 3 2021, 1:14 PM
jdoerfert requested review of this revision.Nov 3 2021, 1:14 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 3 2021, 1:14 PM
jdoerfert updated this revision to Diff 386343.Nov 10 2021, 4:09 PM

Move more values into the kernel environment (and configuration environment), update tests

Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ye-luo added a subscriber: ye-luo.Nov 10 2021, 4:34 PM

the kernel environment which contains information passed by the compiler to a GPU kernel.

DId you mean this environment is baked into kernel at compile time? So there is no additional H2D cost at each call, right?

the kernel environment which contains information passed by the compiler to a GPU kernel.

DId you mean this environment is baked into kernel at compile time? So there is no additional H2D cost at each call, right?

Yes, this environment is a constant fed into the kernel at compile time.
It will allow us to pass more information, e.g., if you want to support sequentialiazed parallel regions, in a way that caused the "feature" to be removed during compilation.
It also allows us to communicate dynamic information in a way that will make us pay for it only if we "enable" it, e.g., if you don't want printf support on AMDGPU you don't have to pay for a buffer.

jdoerfert abandoned this revision.Jan 9 2022, 7:16 PM

Split up, main content starts with D116908.