================ @@ -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" ---------------- aobolensk wrote:
That doesn't feel right... HIPManaged is limited to `LangOpts = [HIP]` in Attr.td: https://github.com/llvm/llvm-project/blob/8ab3bc521aa03e6de2fe4308cb9ec99c3c9ec908/clang/include/clang/Basic/Attr.td#L1616-L1621 https://github.com/llvm/llvm-project/pull/230910 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
