|
8 | 8 | // RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
|
9 | 9 | // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \
|
10 | 10 | // RUN: | FileCheck -check-prefix=CHK-ACTIONS %s
|
| 11 | +// |
| 12 | +// RUN: %clang_cl -### -fsycl \ |
| 13 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ |
| 14 | +// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ |
| 15 | +// RUN: | FileCheck -check-prefix=CHK-ACTIONS-WIN %s |
11 | 16 |
|
12 | 17 | // CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-std=c++11"{{.*}}
|
13 | 18 | // CHK-ACTIONS: sycl-post-link{{.*}} "-split=auto"
|
|
19 | 24 | // CHK-ACTIONS-NOT: "-mllvm -sycl-opt"
|
20 | 25 | // CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=nvptx64" "-kind=sycl"{{.*}}
|
21 | 26 |
|
| 27 | +// CHK-ACTIONS-WIN: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} |
| 28 | +// CHK-ACTIONS-WIN: sycl-post-link{{.*}} "-split=auto" |
| 29 | +// CHK-ACTIONS-WIN: file-table-tform" "-extract=Code" "-drop_titles" |
| 30 | +// CHK-ACTIONS-WIN: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}" |
| 31 | +// CHK-ACTIONS-WIN: llvm-foreach" {{.*}} "--" "{{.*}}ptxas" |
| 32 | +// CHK-ACTIONS-WIN: llvm-foreach" {{.*}} "--" "{{.*}}fatbinary" |
| 33 | +// CHK-ACTIONS-WIN: file-table-tform" "-replace=Code,Code" |
| 34 | +// CHK-ACTIONS-WIN-NOT: "-mllvm -sycl-opt" |
| 35 | +// CHK-ACTIONS-WIN: clang-offload-wrapper"{{.*}} "-host=x86_64-pc-windows-msvc" "-target=nvptx64" "-kind=sycl"{{.*}} |
| 36 | + |
22 | 37 | /// Check phases w/out specifying a compute capability.
|
23 | 38 | // RUN: %clangxx -ccc-print-phases -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \
|
24 | 39 | // RUN: -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
|
25 | 40 | // RUN: | FileCheck -check-prefix=CHK-PHASES-NO-CC %s
|
| 41 | +// |
| 42 | +// RUN: %clang_cl -ccc-print-phases -fsycl \ |
| 43 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \ |
| 44 | +// RUN: | FileCheck -check-prefix=CHK-PHASES-NO-CC %s |
| 45 | +// |
26 | 46 | // CHK-PHASES-NO-CC: 0: input, "{{.*}}", c++, (host-sycl)
|
27 | 47 | // CHK-PHASES-NO-CC: 1: append-footer, {0}, c++, (host-sycl)
|
28 | 48 | // CHK-PHASES-NO-CC: 2: preprocessor, {1}, c++-cpp-output, (host-sycl)
|
29 | 49 | // CHK-PHASES-NO-CC: 3: input, "{{.*}}", c++, (device-sycl, sm_50)
|
30 | 50 | // CHK-PHASES-NO-CC: 4: preprocessor, {3}, c++-cpp-output, (device-sycl, sm_50)
|
31 | 51 | // CHK-PHASES-NO-CC: 5: compiler, {4}, ir, (device-sycl, sm_50)
|
32 |
| -// CHK-PHASES-NO-CC: 6: offload, "host-sycl (x86_64-unknown-linux-gnu)" {2}, "device-sycl (nvptx64-nvidia-cuda:sm_50)" {5}, c++-cpp-output |
| 52 | +// CHK-PHASES-NO-CC: 6: offload, "host-sycl (x86_64-{{.*}})" {2}, "device-sycl (nvptx64-nvidia-cuda:sm_50)" {5}, c++-cpp-output |
33 | 53 | // CHK-PHASES-NO-CC: 7: compiler, {6}, ir, (host-sycl)
|
34 | 54 | // CHK-PHASES-NO-CC: 8: backend, {7}, assembler, (host-sycl)
|
35 | 55 | // CHK-PHASES-NO-CC: 9: assembler, {8}, object, (host-sycl)
|
|
43 | 63 | // CHK-PHASES-NO-CC: 17: foreach, {13, 16}, cuda-fatbin, (device-sycl, sm_50)
|
44 | 64 | // CHK-PHASES-NO-CC: 18: file-table-tform, {12, 17}, tempfiletable, (device-sycl, sm_50)
|
45 | 65 | // CHK-PHASES-NO-CC: 19: clang-offload-wrapper, {18}, object, (device-sycl, sm_50)
|
46 |
| -// CHK-PHASES-NO-CC: 20: offload, "host-sycl (x86_64-unknown-linux-gnu)" {10}, "device-sycl (nvptx64-nvidia-cuda:sm_50)" {19}, image |
| 66 | +// CHK-PHASES-NO-CC: 20: offload, "host-sycl (x86_64-{{.*}})" {10}, "device-sycl (nvptx64-nvidia-cuda:sm_50)" {19}, image |
47 | 67 |
|
48 | 68 | /// Check phases specifying a compute capability.
|
49 | 69 | // RUN: %clangxx -ccc-print-phases -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \
|
50 | 70 | // RUN: -fsycl-targets=nvptx64-nvidia-cuda \
|
51 |
| -N.) |
52 | 71 | // RUN: -Xsycl-target-backend "--cuda-gpu-arch=sm_35" %s 2>&1 \
|
53 | 72 | // RUN: | FileCheck -check-prefix=CHK-PHASES %s
|
| 73 | +// |
| 74 | +// RUN: %clang_cl -ccc-print-phases -fsycl \ |
| 75 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda \ |
| 76 | +// RUN: -Xsycl-target-backend "--cuda-gpu-arch=sm_35" %s 2>&1 \ |
| 77 | +// RUN: | FileCheck -check-prefix=CHK-PHASES %s |
| 78 | +// |
54 | 79 | // CHK-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
|
55 | 80 | // CHK-PHASES: 1: append-footer, {0}, c++, (host-sycl)
|
56 | 81 | // CHK-PHASES: 2: preprocessor, {1}, c++-cpp-output, (host-sycl)
|
57 | 82 | // CHK-PHASES: 3: input, "{{.*}}", c++, (device-sycl, sm_35)
|
58 | 83 | // CHK-PHASES: 4: preprocessor, {3}, c++-cpp-output, (device-sycl, sm_35)
|
59 | 84 | // CHK-PHASES: 5: compiler, {4}, ir, (device-sycl, sm_35)
|
60 |
| -// CHK-PHASES: 6: offload, "host-sycl (x86_64-unknown-linux-gnu)" {2}, "device-sycl (nvptx64-nvidia-cuda:sm_35)" {5}, c++-cpp-output |
| 85 | +// CHK-PHASES: 6: offload, "host-sycl (x86_64-{{.*}})" {2}, "device-sycl (nvptx64-nvidia-cuda:sm_35)" {5}, c++-cpp-output |
61 | 86 | // CHK-PHASES: 7: compiler, {6}, ir, (host-sycl)
|
62 | 87 | // CHK-PHASES: 8: backend, {7}, assembler, (host-sycl)
|
63 | 88 | // CHK-PHASES: 9: assembler, {8}, object, (host-sycl)
|
|
71 | 96 | // CHK-PHASES: 17: foreach, {13, 16}, cuda-fatbin, (device-sycl, sm_35)
|
72 | 97 | // CHK-PHASES: 18: file-table-tform, {12, 17}, tempfiletable, (device-sycl, sm_35)
|
73 | 98 | // CHK-PHASES: 19: clang-offload-wrapper, {18}, object, (device-sycl, sm_35)
|
74 |
| -// CHK-PHASES: 20: offload, "host-sycl (x86_64-unknown-linux-gnu)" {10}, "device-sycl (nvptx64-nvidia-cuda:sm_35)" {19}, image |
| 99 | +// CHK-PHASES: 20: offload, "host-sycl (x86_64-{{.*}})" {10}, "device-sycl (nvptx64-nvidia-cuda:sm_35)" {19}, image |
75 | 100 |
|
76 | 101 | /// Check calling preprocessor only
|
77 | 102 | // RUN: %clangxx -E -fsycl -fsycl-targets=nvptx64-nvidia-cuda -ccc-print-phases %s 2>&1 \
|
78 | 103 | // RUN: | FileCheck -check-prefix=CHK-PREPROC %s
|
79 | 104 | // CHK-PREPROC: 1: preprocessor, {0}, c++-cpp-output, (device-sycl, sm_[[CUDA_VERSION:[0-9.]+]])
|
80 | 105 | // CHK-PREPROC: 2: offload, "device-sycl (nvptx64-nvidia-cuda:sm_[[CUDA_VERSION]])" {1}, c++-cpp-output
|
81 | 106 | // CHK-PREPROC: 4: compiler, {1}, none, (device-sycl, sm_[[CUDA_VERSION]])
|
| 107 | +// |
| 108 | +// RUN: %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ |
| 109 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/no/CUDA/path/here \ |
| 110 | +// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ |
| 111 | +// RUN: | FileCheck -check-prefix=CHK-CUDA-PATH-ERROR %s |
| 112 | +// |
| 113 | +// RUN: %clang_cl -### -fsycl \ |
| 114 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/no/CUDA/path/here \ |
| 115 | +// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ |
| 116 | +// RUN: | FileCheck -check-prefix=CHK-CUDA-PATH-ERROR %s |
| 117 | +// |
| 118 | +// CHK-CUDA-PATH-ERROR: provide path to different CUDA installation via '--cuda-path', or pass '-nocudalib' to build without linking with libdevice |
| 119 | +// |
| 120 | +// |
| 121 | +// RUN: %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ |
| 122 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/no/CUDA/path/here \ |
| 123 | +// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc -nocudalib %s 2>&1 \ |
| 124 | +// RUN: | FileCheck -check-prefix=CHK-CUDA-NO-LIB %s |
| 125 | +// |
| 126 | +// RUN: %clang_cl -### -fsycl \ |
| 127 | +// RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/no/CUDA/path/here \ |
| 128 | +// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc -nocudalib %s 2>&1 \ |
| 129 | +// RUN: | FileCheck -check-prefix=CHK-CUDA-NO-LIB %s |
| 130 | +// |
| 131 | +// CHK-CUDA-NO-LIB-NOT: provide path to different CUDA installation via '--cuda-path', or pass '-nocudalib' to build without linking with libdevice |
| 132 | +// |
0 commit comments