Debian Codegraph @

clang/test/Driver/rocm-detect.cl

raw
1 // Make sure the appropriate device specific library is available.
2
3 // We don't include every target in the test directory, so just pick a valid
4 // target not included in the test.
5
6 // RUN: not %clang -### -v --target=amdgcn-amd-amdhsa -mcpu=gfx902 \
7 // RUN: --rocm-path=%S/Inputs/rocm %s 2>&1 \
8 // RUN: | FileCheck -check-prefixes=COMMON,GFX902-DEFAULTLIBS %s
9
10
11 // RUN: %clang -### -v -target amdgcn-amd-amdhsa -mcpu=gfx902 -nogpulib \
12 // RUN: --rocm-path=%S/Inputs/rocm %s 2>&1 \
13 // RUN: | FileCheck -check-prefixes=COMMON,NODEFAULTLIBS %s
14
15 // GFX902-DEFAULTLIBS: error: cannot find ROCm device library for gfx902; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
16
17 // NODEFAULTLIBS-NOT: error: cannot find
18
19 // COMMON: "-triple" "amdgcn-amd-amdhsa"