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

Greg Rodgers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 07:59:19 PDT 2020


gregrodgers added a comment.

This is all excellent feedback.  Thank  you.  
I don't understand what I see on the godbolt link.  So far, we have only tested with clang.  We will test with gcc to understand the fail.  
I will make the change to use numeric values for _DEVICE_ARCH and change "UNKNOWN" to some integer (maybe -1).   The value _DEVICE_GPU is intended to be generational within a specific _DEVICE_ARCH.   
To be clear, this is primarily for users or library writers to implement device specific or host-only code.   This is not something that should be automatic.  Users or library authors will opt-in with their own include.  So maybe it does not belong in clang/lib/Headers.  
As noted in the header comment, I expect the community to help keep this up to date as offloading technology evolves.


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