[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 30 11:45:27 PDT 2018
tra added a comment.
In https://reviews.llvm.org/D50845#1219733, @Hahnfeld wrote:
> In https://reviews.llvm.org/D50845#1219726, @gtbercea wrote:
>
> > In general, it looks like this patch leads to some host macros having to be defined again for the auxiliary triple case. It is not clear to me how to exhaustively identify the missing macros, so far it's been just trial and error.
>
>
> Well, that's the point of this patch, isn't it? Again, the current approach is to just define all macros which is definitely broken.
I would agree that it it does not work for OpenMP which relies on host headers to be usable for device compilation.
It works OK for CUDA as device code can co-exist with the host code.
Perhaps the patch should keep existing behavior for CUDA and cherry-pick macros for OpenMP compilation only.
Repository:
rL LLVM
https://reviews.llvm.org/D50845
More information about the cfe-commits
mailing list