|
1 | 1 | // REQUIRES: x86-registered-target, amdgpu-registered-target
|
2 | 2 |
|
3 | 3 | // Fail on invalid ROCm Path.
|
4 |
| -// RUN: not %clang -### -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize -nogpuinc --rocm-path=%S/Inputs/rocm-invalid %s 2>&1 \ |
| 4 | +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize -nogpuinc --rocm-path=%S/Inputs/rocm-invalid %s 2>&1 \ |
5 | 5 | // RUN: | FileCheck --check-prefix=FAIL %s
|
6 | 6 |
|
7 | 7 | // Enable multiple sanitizer's apart from ASan with invalid rocm-path.
|
8 |
| -// RUN: not %clang -### -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fsanitize=leak -fgpu-sanitize --rocm-path=%S/Inputs/rocm-invalid -nogpuinc %s 2>&1 \ |
9 |
| -// RUN: | FileCheck --check-prefixes=UNSUPPORTED,FAIL %s |
| 8 | +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fsanitize=leak -fgpu-sanitize --rocm-path=%S/Inputs/rocm-invalid -nogpuinc %s 2>&1 \ |
| 9 | +// RUN: | FileCheck --check-prefixes=NOTSUPPORTED,FAIL %s |
10 | 10 |
|
11 |
| -// Memory, Leak, UndefinedBehaviour and Thread Sanitizer are not supported. |
12 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fsanitize=leak -fgpu-sanitize --rocm-path=%S/Inputs/rocm -nogpuinc %s 2>&1 \ |
13 |
| -// RUN: | FileCheck --check-prefix=UNSUPPORTED %s |
| 11 | +// Memory, Leak, UndefinedBehaviour and Thread Sanitizer are not supported on AMDGPU. |
| 12 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fsanitize=leak -fgpu-sanitize --rocm-path=%S/Inputs/rocm -nogpuinc %s 2>&1 \ |
| 13 | +// RUN: | FileCheck --check-prefix=NOTSUPPORTED %s |
14 | 14 |
|
15 |
| - |
16 |
| -// ASan Enabled Test Cases |
| 15 | +// GPU ASan Enabled Test Cases |
17 | 16 | // ASan enabled for amdgpu-arch [gfx908]
|
18 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908 -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 17 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908 -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
19 | 18 | // RUN: | FileCheck -check-prefixes=NOXNACK,GPUSAN %s
|
20 | 19 |
|
21 |
| -// ASan enabled for amdgpu-arch [gfx908:xnack-] |
22 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908:xnack- -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 20 | +// GPU ASan enabled for amdgpu-arch [gfx908:xnack-] |
| 21 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack- -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
23 | 22 | // RUN: | FileCheck -check-prefixes=XNACKNEG,GPUSAN %s
|
24 | 23 |
|
25 |
| -// ASan enabled for amdgpu-arch [gfx908:xnack+] |
26 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 24 | +// GPU ASan enabled for amdgpu-arch [gfx908:xnack+] |
| 25 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 26 | +// RUN: | FileCheck -check-prefixes=GPUSAN %s |
| 27 | + |
| 28 | +// ASan enabled for multiple amdgpu-arch [gfx908:xnack+,gfx900:xnack+] |
| 29 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ --offload-arch=gfx900:xnack+ -fsanitize=address -fgpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
27 | 30 | // RUN: | FileCheck -check-prefixes=GPUSAN %s
|
28 | 31 |
|
29 |
| -// ASan Disabled Test Cases |
| 32 | +// GPU ASan Disabled Test Cases |
30 | 33 | // ASan disabled for amdgpu-arch [gfx908]
|
31 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908 -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 34 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908 -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 35 | +// RUN: | FileCheck -check-prefixes=NOGPUSAN %s |
| 36 | + |
| 37 | +// GPU ASan disabled for amdgpu-arch [gfx908:xnack-] |
| 38 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack- -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
32 | 39 | // RUN: | FileCheck -check-prefixes=NOGPUSAN %s
|
33 | 40 |
|
34 |
| -// ASan disabled for amdgpu-arch [gfx908:xnack-] |
35 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908:xnack- -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 41 | +// GPU ASan disabled for amdgpu-arch [gfx908:xnack+] |
| 42 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
36 | 43 | // RUN: | FileCheck -check-prefixes=NOGPUSAN %s
|
37 | 44 |
|
38 |
| -// ASan disabled for amdgpu-arch [gfx908:xnack+] |
39 |
| -// RUN: %clang -### -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
| 45 | +// ASan disabled for amdgpu-arch [gfx908:xnack+,gfx900:xnack+] |
| 46 | +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ --offload-arch=gfx900:xnack+ -fsanitize=address -fno-gpu-sanitize --rocm-path=%S/Inputs/rocm %s 2>&1 \ |
40 | 47 | // RUN: | FileCheck -check-prefixes=NOGPUSAN %s
|
41 | 48 |
|
42 | 49 | // FAIL-DAG: error: cannot find ROCm device library for ABI version 5; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
|
43 |
| -// UNSUPPORTED-DAG: warning: ignoring '-fsanitize=leak' option as it is not currently supported for target 'amdgcn-amd-amdhsa' |
| 50 | +// NOTSUPPORTED-DAG: warning: ignoring '-fsanitize=leak' option as it is not currently supported for target 'amdgcn-amd-amdhsa' |
44 | 51 |
|
45 | 52 | // NOXNACK: warning: ignoring '-fsanitize=address' option for offload arch 'gfx908' as it is not currently supported there. Use it with an offload arch containing 'xnack+' instead
|
46 | 53 | // XNACKNEG: warning: ignoring '-fsanitize=address' option for offload arch 'gfx908:xnack-' as it is not currently supported there. Use it with an offload arch containing 'xnack+' instead
|
47 | 54 |
|
48 | 55 | // GPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "x86_64-unknown-linux-gnu".* "-fopenmp".* "-fsanitize=address".* "-fopenmp-targets=amdgcn-amd-amdhsa".* "-x" "c".*}}
|
49 |
| -// GPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu".* "-emit-llvm-bc".* "-target-cpu" "gfx908".* "-fopenmp".* "-fsanitize=address".* "-x" "c".*}} |
| 56 | +// GPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu".* "-emit-llvm-bc".* "-target-cpu" "(gfx908|gfx900)".* "-fopenmp".* "-fsanitize=address".* "-x" "c".*}} |
50 | 57 | // GPUSAN: {{"[^"]*clang-offload-packager[^"]*" "-o".* "--image=file=.*.bc,triple=amdgcn-amd-amdhsa,arch=gfx908(:xnack\-|:xnack\+)?,kind=openmp(,feature=(\-xnack|\+xnack))?"}}
|
51 | 58 | // GPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "x86_64-unknown-linux-gnu".* "-fopenmp".* "-fsanitize=address".* "-fopenmp-targets=amdgcn-amd-amdhsa".* "-x" "ir".*}}
|
52 | 59 | // GPUSAN: {{"[^"]*clang-linker-wrapper[^"]*" "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=[^"]*".* "--whole-archive" "[^"]*libclang_rt.asan_static.a".* "--whole-archive" "[^"]*libclang_rt.asan.a".*}}
|
53 | 60 |
|
54 | 61 | // NOGPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "x86_64-unknown-linux-gnu".* "-fopenmp".* "-fsanitize=address".* "-fopenmp-targets=amdgcn-amd-amdhsa".* "-x" "c".*}}
|
55 |
| -// NOGPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu".* "-emit-llvm-bc".* "-target-cpu" "gfx908".* "-fopenmp".* "-x" "c".*}} |
| 62 | +// NOGPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu".* "-emit-llvm-bc".* "-target-cpu" "(gfx908|gfx900)".* "-fopenmp".* "-x" "c".*}} |
56 | 63 | // NOGPUSAN: {{"[^"]*clang-offload-packager[^"]*" "-o".* "--image=file=.*.bc,triple=amdgcn-amd-amdhsa,arch=gfx908(:xnack\-|:xnack\+)?,kind=openmp(,feature=(\-xnack|\+xnack))?"}}
|
57 | 64 | // NOGPUSAN: {{"[^"]*clang[^"]*" "-cc1" "-triple" "x86_64-unknown-linux-gnu".* "-fopenmp".* "-fsanitize=address".* "-fopenmp-targets=amdgcn-amd-amdhsa".* "-x" "ir".*}}
|
58 | 65 | // NOGPUSAN: {{"[^"]*clang-linker-wrapper[^"]*" "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=[^"]*".* "--whole-archive" "[^"]*libclang_rt.asan_static.a".* "--whole-archive" "[^"]*libclang_rt.asan.a".*}}
|
0 commit comments