[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 14:19:13 PST 2025
================
@@ -1338,9 +1338,7 @@ struct InformationCache {
bool stackIsAccessibleByOtherThreads() { return !targetIsGPU(); }
/// Return true if the target is a GPU.
- bool targetIsGPU() {
- return TargetTriple.isAMDGPU() || TargetTriple.isNVPTX();
- }
+ bool targetIsGPU() { return TargetTriple.isOffloadingTargetGPU(); }
----------------
shiltian wrote:
This also implies that SPIR-V is a GPU target triple, but is it true?
https://github.com/llvm/llvm-project/pull/126956
More information about the llvm-commits
mailing list