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

2022-11-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This might be useful in the context of generating multi-architecture libraries when we start writing `libc` and `libc++` functionality. Although I can't name any use-cases for certain right now. However, shouldn't we just be able to define these in `clang` along similar

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

2022-11-11 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Herald added subscribers: kosarev, StephenFan. Herald added a project: All. Is this still relevant? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84743/new/ https://reviews.llvm.org/D84743 __

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

2020-07-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Also, do we need the header at all? It would be much easier to just get clang itself to add normalized macros without trying to reconstruct them from the existing macros. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84743/new/

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

2020-07-29 Thread Greg Rodgers via Phabricator via cfe-commits
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 "UNKNO

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

2020-07-29 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. We probably do want a macro to indicate 'compiling for amdgcn as the device half of a combined host+device language'. I'm having a tough time with the control flow in this header so we probably want tests to check the overall behaviour is as intended. E.g. stati

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

2020-07-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Headers/offload_macros.h:1 +//===--- offload_macros.h - Universal _DEVICE Offloading Macros Header ---===// +// After @MaskRay noticed this, I think this should be `__offload_macros.h` to make it clear this

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

2020-07-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D84743#2181044 , @MaskRay wrote: > In D84743#2181031 , @jdoerfert wrote: > >> In D84743#2179441 , @tra wrote: >> >>> I'm not sure it's particula

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

2020-07-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D84743#2181031 , @jdoerfert wrote: > In 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 c

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

2020-07-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In 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. >

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

2020-07-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. 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.

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

2020-07-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added reviewers: tra, MaskRay. jdoerfert added subscribers: MaskRay, tra. jdoerfert added a comment. I like this. I hope this is the start of splitting the `__cuda` headers into generic and specific code, right? @tra @MaskRay any objections on the direction? Commen

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

2020-07-28 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a reviewer: arsenm. JonChesterfield added a comment. Herald added a subscriber: wdng. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84743/new/ https://reviews.llvm.org/D84743 ___ c

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

2020-07-28 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam created this revision. saiislam added reviewers: jdoerfert, ABataev, JonChesterfield. Herald added subscribers: cfe-commits, Anastasia. Herald added a project: clang. Harbormaster failed remote builds in B65994: Diff 281183! Harbormaster returned this revision to the author for changes bec