File: hip-output-file-name.hip

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-16
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,368 kB
  • sloc: cpp: 5,593,980; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (86 lines) | stat: -rw-r--r-- 3,996 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// REQUIRES: clang-driver
// REQUIRES: x86-registered-target
// REQUIRES: amdgpu-registered-target

// Output bundled code objects for combined compilation.
// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck %s

// CHECK: {{.*}}clang-offload-bundler{{.*}}"-outputs=hip-output-file-name.o"

// Check -E default output is "-" (stdout).
// If there are multiple preprocessor expansion outputs clang-offload-bundler
// is used to bundle the final output.

// Output bundled PPE for one GPU for mixed compliation.
// RUN: %clang -### -E -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s

// Output unbundled PPE for one GPU for device only compilation.
// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s

// Output bundled PPE for two GPUs for mixed compilation.
// RUN: %clang -### -E -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s

// Output bundled PPE for two GPUs for mixed compilation with -save-temps.
// RUN: %clang -### -E -save-temps -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s

// Output unbundled PPE for two GPUs for device only compilation.
// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s

// Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output.
// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --gpu-bundle-output \
// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s

// Output unbundled PPE for two GPUs for device only compilation with --no-gpu-bundle-output.
// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --no-gpu-bundle-output \
// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s

// Output unbundled PPE for host only compilation.
// RUN: %clang -### -E --cuda-host-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s

// DASH-NOT: {{.*}}clang{{.*}}"-o" "-"
// DASH: {{.*}}clang-offload-bundler{{.*}}"-outputs=-"
// CLANG-DASH: {{.*}}clang{{.*}}"-o" "-"
// CLANG-DASH-NOT: {{.*}}clang-offload-bundler{{.*}}"-outputs=-"

// Check -E with -o.

// Output bundled PPE for two GPUs for mixed compilation.
// RUN: %clang -### -E -o test.cui -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=OUT %s

// Output bundled PPE for two GPUs for mixed compilation.
// RUN: %clang -### -E -o test.cui -save-temps -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=OUT %s

// Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output.
// RUN: %clang -### -E -o test.cui --cuda-device-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 --gpu-bundle-output %s \
// RUN: 2>&1 | FileCheck -check-prefixes=OUT %s

// Output unbundled PPE for two GPUs for device only compilation.
// RUN: %clang -### -E -o test.cui --cuda-host-only -target x86_64-linux-gnu \
// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-OUT %s

// OUT-NOT: {{.*}}clang{{.*}}"-o" "test.cui"
// OUT: {{.*}}clang-offload-bundler{{.*}}"-outputs=test.cui"
// CLANG-OUT: {{.*}}clang{{.*}}"-o" "test.cui"
// CLANG-OUT-NOT: {{.*}}clang-offload-bundler{{.*}}"-outputs=test.cui"