[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 08:15:58 PDT 2024
erichkeane wrote:
Bizarrely if I run the piped version, I get no error:
```
ekeane at dev-epyc4:/local/home/ekeane/llvm-project/build$ /local/home/ekeane/llvm-project/build/bin/clang -### -x cuda --target=powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -nocudainc -nocudalib -fopenmp=libomp /local/home/ekeane/llvm-project/clang/test/Driver/offloading-interoperability.c 2>&1 | /local/home/ekeane/llvm-project/build/bin/FileCheck /local/home/ekeane/llvm-project/clang/test/Driver/offloading-in
teroperability.c --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
ekeane at dev-epyc4:/local/home/ekeane/llvm-project/build$ echo $?
0
```
Not piped version I get:
```
ekeane at dev-epyc4:/local/home/ekeane/llvm-project/build$ /local/home/ekeane/llvm-project/build/bin/clang -### -x cuda --target=powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -nocudainc -nocudalib -fopenmp=libomp /local/home/ekeane/llvm-project/clang/test/Driver/offloading-interoperability.c
clang version 19.0.0git (https://github.com/erichkeane/llvm-project.git a7356fdfa7973e19008fda95c8e1e6ed7ac049d3)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/home/ekeane/llvm-project/build/bin
Build config: +unoptimized, +assertions
clang: error: GPU arch sm_35 is supported by CUDA versions between 7.0 and 11.8 (inclusive), but installation at /usr/local/cuda is 12.3; use '--cuda-path' to specify a different CUDA install, pass a different GPU arch with '--cuda-gpu-arch', or pass '--no-cuda-version-check'
"/local/home/ekeane/llvm-project/build/bin/clang-19" "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "powerpc64le-unknown-linux-gnu" "-S" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "offloading-interoperability.c" "-mrelocation-model" "static" "-mframe-pointer=all" "-fno-rounding-math" "-no-integrated-as" "-aux-target-cpu" "ppc64le" "-fcuda-is-device" "-mllvm" "-enable-memcpyopt-wi
thout-libcalls" "-fcuda-allow-variadic-functions" "-target-cpu" "sm_35" "-target-feature" "+ptx83" "-debugger-tuning=gdb" "-fno-dwarf-directory-asm" "-fdebug-compilation-dir=/local/home/ekeane/llvm-project/build" "-resource-dir" "/local/home/ekeane/llvm-project/build/lib/clang/19" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include/cuda_wrappers" "-internal-isystem" "/local/home/ekeane/llvm-pr
oject/build/lib/clang/19/include/ppc_wrappers" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include/ppc_wrappers" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include
" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-std=c++11" "-fdeprecated-macro" "-fno-autolink" "-ferror-limit" "19" "-nogpulib" "-fno-signed-char" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-cuid=24ba0afc7304b70d" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/tmp/offloading-interoperabil
ity-sm_35-6a2c33.s" "-x" "cuda" "/local/home/ekeane/llvm-project/clang/test/Driver/offloading-interoperability.c"
"/usr/local/cuda/bin/ptxas" "-m64" "-O0" "--gpu-name" "sm_35" "--output-file" "/tmp/offloading-interoperability-sm_35-618b9f.cubin" "/tmp/offloading-interoperability-sm_35-6a2c33.s"
"/usr/local/cuda/bin/fatbinary" "-64" "--create" "/tmp/offloading-interoperability-02eb3f.fatbin" "--image=profile=sm_35,file=/tmp/offloading-interoperability-sm_35-618b9f.cubin" "--image=profile=compute_35,file=/tmp/offloading-interoperability-sm_35-6a2c33.s"
"/local/home/ekeane/llvm-project/build/bin/clang-19" "-cc1" "-triple" "powerpc64le-unknown-linux-gnu" "-target-sdk-version=12.3" "-fcuda-allow-variadic-functions" "-aux-triple" "nvptx64-nvidia-cuda" "-emit-obj" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "offloading-interoperability.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-c
ontract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "ppc64le" "-mfloat-abi" "hard" "-target-abi" "elfv2" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/local/home/ekeane/llvm-project/build" "-fcoverage-compilation-dir=/local/home/ekeane/llvm-project/build" "-resource-dir" "/local/home/ekeane/llvm-project/build/lib/clang/19" "-internal-isystem" "/local/home/ekeane/llvm-project/buil
d/lib/clang/19/include/cuda_wrappers" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include/ppc_wrappers" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include/ppc_wrap
pers" "-internal-isystem" "/local/home/ekeane/llvm-project/build/lib/clang/19/include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-std=c++11" "-fdeprecated-macro" "-ferror-limit" "19" "-fopenmp" "-nogpulib" "-fno-signed-char" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-fcuda-incl
ude-gpubinary" "/tmp/offloading-interoperability-02eb3f.fatbin" "-cuid=24ba0afc7304b70d" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/tmp/offloading-interoperability-a9c0fb.o" "-x" "cuda" "/local/home/ekeane/llvm-project/clang/test/Driver/offloading-interoperability.c"
"/usr/bin/ld" "-z" "relro" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf64lppc" "-pie" "-dynamic-linker" "/lib64/ld64.so.2" "-o" "a.out" "Scrt1.o" "crti.o" "crtbeginS.o" "-L/lib/../lib64" "-L/usr/lib/../lib64" "-L/lib" "-L/usr/lib" "/tmp/offloading-interoperability-a9c0fb.o" "-lomp" "-L/local/home/ekeane/llvm-project/build/lib" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-lg
cc_s" "--no-as-needed" "crtendS.o" "crtn.o"
```
https://github.com/llvm/llvm-project/pull/94000
More information about the cfe-commits
mailing list