[Openmp-dev] OpenMP defines __CUDA_ARCH__ for offloading, should it?

Jon Chesterfield via Openmp-dev openmp-dev at lists.llvm.org
Wed Jul 22 09:34:49 PDT 2020


Discovered by accident while looking into a bug for Ron (cc'd).

OpenMP running on nvptx defines the __CUDA_ARCH__ macro. Do we think it
should? OpenMP target offloading is somewhat implemented in terms of cuda
but that seems incidental.

I'd like a __GPU_ARCH__ macro which expands to something useful for nvptx,
amdgcn, other. And to not define CUDA_ARCH when compiling openmp offloading
code.

Thoughts?

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200722/5ced93bb/attachment.html>


More information about the Openmp-dev mailing list