[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-11 Thread Joseph Huber via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0035f7154c2a: [CUDA] Create offloading entries when using the new driver (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Is this with D123810 and D123812 good to land? It would be nice to be able to test this upstream. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 428188. jhuber6 added a comment. Clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 428186. jhuber6 added a comment. Updating comments to desceibe usage of flags with zero size. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files:

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. jhuber6 wrote: > tra wrote: > > jhuber6 wrote: >

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. tra wrote: > jhuber6 wrote: > > tra wrote: >

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. jhuber6 wrote: > tra wrote: > > jhuber6 wrote: >

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. tra wrote: > jhuber6 wrote: > > tra wrote: >

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. jhuber6 wrote: > tra wrote: > > We're still using

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. tra wrote: > We're still using the same

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. We're still using the same numeric value for two

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 427766. jhuber6 added a comment. removing enum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:56-70 +enum OffloadRegionEntryKindFlag : uint32_t { + /// Mark the region entry as a kernel. + OffloadRegionKernelEntry = 0x0, +}; + +/// The kind flag of the global variable

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:56-70 +enum OffloadRegionEntryKindFlag : uint32_t { + /// Mark the region entry as a kernel. + OffloadRegionKernelEntry = 0x0, +}; + +/// The kind flag of the global variable entry. +

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:56-70 +enum OffloadRegionEntryKindFlag : uint32_t { + /// Mark the region entry as a kernel. + OffloadRegionKernelEntry = 0x0, +}; + +/// The kind flag of the global variable

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:56-70 +enum OffloadRegionEntryKindFlag : uint32_t { + /// Mark the region entry as a kernel. + OffloadRegionKernelEntry = 0x0, +}; + +/// The kind flag of the global variable entry. +

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 427701. jhuber6 added a comment. Changing enum values from a bitfield to simple enumeration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files:

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58-70 + OffloadRegionKernelEntry = 0x0, +}; + +/// The kind flag of the global variable entry. +enum OffloadVarEntryKindFlag : uint32_t { + /// Mark the entry as a global variable.

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D123471#3497224 , @jhuber6 wrote: > It's a little tough, I chose that format because it's exactly the same as we > use with OpenMP with a few different flags. I wish whoever initially designed > the struct made the ``reserved``

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3497169 , @tra wrote: >> Type struct __tgt_offload_entry { >> >> void*addr; // Pointer to the offload entry info. >> // (function or global) >> char*name; // Name of the

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > Type struct __tgt_offload_entry { > > void*addr; // Pointer to the offload entry info. > // (function or global) > char*name; // Name of the function or global. > size_t size; // Size of the entry info (0 if it a

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-05-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 426404. jhuber6 added a comment. Fix test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 426150. jhuber6 added a comment. Fixed missing info flag for `--offload-new-driver`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files:

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 426051. jhuber6 added a comment. Herald added a subscriber: mattd. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files:

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3446751 , @yaxunl wrote: > HIP is considering a unified device binary embedding scheme with OpenMP. > However, some large MI frameworks are compiled with -fno-gpu-rdc. If > compiling with -fgpu-rdc, the linking time

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. HIP is considering a unified device binary embedding scheme with OpenMP. However, some large MI frameworks are compiled with -fno-gpu-rdc. If compiling with -fgpu-rdc, the linking time will significantly increase since the post-linking optimizations take much longer

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3446464 , @tra wrote: > I've mentioned in D123441 that it would be > useful to have a list of GPU-side symbols needed by the host and this offload > info is pretty close to what we

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've mentioned in D123441 that it would be useful to have a list of GPU-side symbols needed by the host and this offload info is pretty close to what we need. The only remaining feature is being able to extract them by external tool, so

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3443612 , @yaxunl wrote: > Is OpenMP runtime able to find these entries without registering them through > some API functions? If so, do you have a pointer to the code doing that? Yes, the linker will define

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Is OpenMP runtime able to find these entries without registering them through some API functions? If so, do you have a pointer to the code doing that? most CUDA/HIP programs assume -fno-gpu-rdc mode, which have multiple sections containing these entries merged by

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ronlieb, yaxunl, tra. Herald added subscribers: carlosgalvezp, dexonsmith. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald