[Openmp-dev] OpenMP defines __CUDA_ARCH__ for offloading, should it?
Johannes Doerfert via Openmp-dev
openmp-dev at lists.llvm.org
Wed Jul 22 10:10:04 PDT 2020
I'm not convinced. Even after we move the `cuda_wrapper` headers into a
`gpu_wrapper`
folder and make them generic, it is unclear to me that this will work
better. We'll end
up with these:
`__GPU_ARCH__ > 70 && __IS_AMDGCN__`
I would suggest we keep __CUDA_ARCH__ and introduce __AMDGCN_ARCH__ as
needed.
TBH, I also haven't understood what the problem actually is.
On 7/22/20 11:34 AM, Jon Chesterfield via Openmp-dev wrote:
> 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
>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
More information about the Openmp-dev
mailing list