|
1 | | -// Save PTX files during PTX target processing using -fsycl-dump-device-code option. |
| 1 | +// Save PTX files during PTX target processing using -save-offload-code option. |
2 | 2 |
|
3 | | -// Verify that -fsycl-dump-device-code saves PTX files in the user provided directory |
| 3 | +// Verify that -save-offload-code saves PTX files in the user provided directory |
4 | 4 | // while targeting CUDA enabled GPUs. |
5 | 5 |
|
6 | 6 | // Linux |
7 | | -// RUN: %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda,spir64-unknown-unknown -target x86_64-unknown-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda -fsycl-dump-device-code=/user/input/path %s 2>&1 \ |
| 7 | +// RUN: %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda,spir64-unknown-unknown -target x86_64-unknown-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda -save-offload-code=/user/input/path %s 2>&1 \ |
8 | 8 | // RUN: | FileCheck %s --check-prefixes=CHECK-PTX-FILES,CHECK-SPIRV-FILES |
9 | 9 |
|
10 | 10 | // clang --driver-mode=g++ |
11 | | -// RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -target x86_64-unknown-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda -fsycl-dump-device-code=/user/input/path %s 2>&1 \ |
| 11 | +// RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -target x86_64-unknown-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda -save-offload-code=/user/input/path %s 2>&1 \ |
12 | 12 | // RUN: | FileCheck %s --check-prefixes=CHECK-PTX-FILES |
13 | 13 |
|
14 | | -// RUN: %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda,spir64-unknown-unknown -target x86_64-unknown-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda -fsycl-dump-device-code= %s 2>&1 \ |
| 14 | +// RUN: %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda,spir64-unknown-unknown -target x86_64-unknown-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda -save-offload-code= %s 2>&1 \ |
15 | 15 | // RUN: | FileCheck %s --check-prefixes=CHECK-PTX-FILES-CWD,CHECK-SPIRV-FILES-CWD |
16 | 16 |
|
17 | 17 | // CHECK-PTX-FILES: llvm-foreach{{.*}} "--out-ext=s"{{.*}} "--out-dir=/user/input/path{{(/|\\\\)}}" "--" "{{.*}}clang{{.*}}" {{.*}} "-fsycl-is-device" {{.*}}.s{{.*}} |
|
22 | 22 | // Windows - Check if PTX files are saved in the user provided path. |
23 | 23 | // RUN: %clang_cl -### -fsycl \ |
24 | 24 | // RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ |
25 | | -// RUN: -fsycl-dump-device-code=/user/input/path %s 2>&1 \ |
| 25 | +// RUN: -Qsave-offload-code=/user/input/path %s 2>&1 \ |
26 | 26 | // RUN: | FileCheck -check-prefix=CHECK-PTX-WIN %s |
27 | 27 |
|
28 | 28 | // Windows - Check if PTX and SPV files are saved in user provided path. |
29 | 29 | // RUN: %clang_cl -### -fsycl \ |
30 | 30 | // RUN: -fsycl-targets=nvptx64-nvidia-cuda,spir64-unknown-unknown --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ |
31 | | -// RUN: -fsycl-dump-device-code=/user/input/path %s 2>&1 \ |
| 31 | +// RUN: -Qsave-offload-code=/user/input/path %s 2>&1 \ |
32 | 32 | // RUN: | FileCheck -check-prefixes=CHECK-PTX-WIN,CHECK-SPV-WIN %s |
33 | 33 |
|
34 | | -// Windows - Check PTX files saved in current working directory when -fsycl-dump-device-code |
| 34 | +// Windows - Check PTX files saved in current working directory when -save-offload-code |
35 | 35 | // is empty. |
36 | 36 | // RUN: %clang_cl -### -fsycl \ |
37 | 37 | // RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ |
38 | | -// RUN: -fsycl-dump-device-code= %s 2>&1 \ |
| 38 | +// RUN: -Qsave-offload-code= %s 2>&1 \ |
39 | 39 | // RUN: | FileCheck -check-prefix=CHECK-PTX-WIN-CWD %s |
40 | 40 |
|
41 | 41 | // CHECK-PTX-WIN: llvm-foreach{{.*}} "--out-ext=s"{{.*}} "--out-dir=/user/input/path{{(/|\\\\)}}" "--" "{{.*}}clang{{.*}}" {{.*}} "-fsycl-is-device" {{.*}}.asm{{.*}} |
|
0 commit comments