[PATCH] D84743: [Clang][AMDGCN] Universal device offloading macros header

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 22:42:19 PDT 2020


MaskRay added a comment.

In D84743#2181031 <https://reviews.llvm.org/D84743#2181031>, @jdoerfert wrote:

> In D84743#2179441 <https://reviews.llvm.org/D84743#2179441>, @tra wrote:
>
>> I'm not sure it's particularly useful, to be honest. CUDA code still needs to be compatible with NVCC so it can't be used in portable code like TF or other currently used CUDA libraries.
>> It could be useful internally, though, so I'm fine with it for that purpose.
>
> FWIW, I was only thinking about `clang/lib/Header` usage. *Potentially* documented for user of clang.

Honestly I am a bit uneasy with the new clang/lib/Header file. It will be part of the clang resource directory and users on every target will be able to `#include <offload_macros.h>` it.
This is also a namespace pollution - used incorrectly, people can trip over it if they have files of the same name.

I think there really should be a good justification for it being being part of the resource directory and not a library, and there needs to be a specification.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84743



More information about the cfe-commits mailing list