[Openmp-commits] [PATCH] D75788: [WIP][OpenMP] Reuse CUDA wrappers in `nvptx` target regions.

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 6 21:59:43 PST 2020


jdoerfert marked an inline comment as done.
jdoerfert added a comment.

In D75788#1910743 <https://reviews.llvm.org/D75788#1910743>, @JonChesterfield wrote:

> That's less invasive than I feared. Nicely done.


We need to run some more tests to make sure it works as expected but I hope we can completely piggy back on the underlying "language" support.

> It may worth keeping the openmp header wrapper to do architecture dispatch. Something like:

We can do that or adjust the pipeline based on the target, either is fine with me.



================
Comment at: clang/lib/Headers/cuda_wrappers/new:36
 
+#ifdef _OPENMP
+#define __DEVICE__
----------------
JonChesterfield wrote:
> macros look off here - should it be `#define DEVICE`, or the following uses `__DEVICE__`?
Yes.

Furthermore I think I want to introduce the effect of `__device__` as an attribute, basically `match(device={arch(nvptx)}` on a single function. That would make the declare variant go away and allow us to piggy back on the `__DEVICE__` directly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75788/new/

https://reviews.llvm.org/D75788





More information about the Openmp-commits mailing list