================
@@ -0,0 +1,97 @@
+// RUN: echo -n "GPU binary would be here." > %t
+
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fcuda-is-device -fclangir \
+// RUN:            -x hip -emit-cir %s -o %t.dev.cir
+// RUN: FileCheck --check-prefix=CIR-DEV --input-file=%t.dev.cir %s
+
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fcuda-is-device -fclangir \
+// RUN:            -x hip -emit-llvm %s -o %t.dev.cir.ll
+// RUN: FileCheck --check-prefix=DEV --input-file=%t.dev.cir.ll %s
+
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fcuda-is-device \
+// RUN:            -x hip -emit-llvm %s -o %t.dev.ll
+// RUN: FileCheck --check-prefix=DEV --input-file=%t.dev.ll %s
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir \
+// RUN:            -x hip -fhip-new-launch-api -fcuda-include-gpubinary %t \
+// RUN:            -emit-cir %s -o %t.host.cir
+// RUN: FileCheck --check-prefix=CIR-HOST --input-file=%t.host.cir %s
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir \
+// RUN:            -x hip -fhip-new-launch-api -fcuda-include-gpubinary %t \
+// RUN:            -emit-llvm %s -o %t.host.cir.ll
+// RUN: FileCheck --check-prefix=HOST --input-file=%t.host.cir.ll %s
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:            -x hip -fhip-new-launch-api -fcuda-include-gpubinary %t \
+// RUN:            -emit-llvm %s -o %t.host.ll
+// RUN: FileCheck --check-prefix=HOST --input-file=%t.host.ll %s
+
+#include "../CodeGenCUDA/Inputs/cuda.h"
----------------
Sirraide wrote:

> @Sirraide - Do you know the history here? Seems like there is an open issues 
> (#40874 & #147373), but they seem old and somewhat stale.

I’m aware of the issues existing but I haven’t checked on the state of 
`__managed__` in Clang; it would be good if we could enable that for CUDA as 
well assuming the implementation actually matches NVCC's semantics (within 
reason at least)

https://github.com/llvm/llvm-project/pull/230910
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to