Clang Project

clang_source_code/test/Driver/hip-inputs.hip
1// REQUIRES: clang-driver
2// REQUIRES: x86-registered-target
3// REQUIRES: amdgpu-registered-target
4
5// RUN: %clang -ccc-print-phases -target x86_64-linux-gnu \
6// RUN:   -x hip --cuda-gpu-arch=gfx803 -c \
7// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \
8// RUN:   %S/Inputs/hip_multiple_inputs/b.hip 2>&1 \
9// RUN: | FileCheck %s
10
11// RUN: not %clang -ccc-print-phases -target x86_64-linux-gnu \
12// RUN:   --cuda-gpu-arch=gfx803 -c \
13// RUN:   %S/Inputs/hip_multiple_inputs/a.cu \
14// RUN:   %S/Inputs/hip_multiple_inputs/b.hip 2>&1 \
15// RUN: | FileCheck -check-prefix=MIX %s
16
17// RUN: not %clang -ccc-print-phases -target x86_64-linux-gnu \
18// RUN:   --cuda-gpu-arch=gfx803 -c \
19// RUN:   --hip-link %S/Inputs/hip_multiple_inputs/a.cu 2>&1 \
20// RUN: | FileCheck -check-prefix=MIX %s
21
22// CHECK-NOT: error: Mixed Cuda and HIP compilation is not supported.
23// MIX: error: Mixed Cuda and HIP compilation is not supported.
24