[PATCH] D156930: [Clang] Fix Offloading related tests after D156363
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbc080221b3a2: [Clang] Fix Offloading related tests after D156363 (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D156930?vs=546564&id=546578#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156930/new/ https://reviews.llvm.org/D156930 Files: clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_35.bc clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_52.bc clang/test/Driver/Inputs/libomptarget/subdir/libomptarget-nvptx-sm_35.bc clang/test/Driver/Inputs/libomptarget/subdir/libomptarget-nvptx-sm_52.bc clang/test/Driver/amdgpu-hip-system-arch.c clang/test/Driver/cuda-bad-arch.cu clang/test/Driver/hip-autolink.hip clang/test/Driver/hip-binding.hip clang/test/Driver/hip-cuid-hash.hip clang/test/Driver/hip-cuid.hip clang/test/Driver/hip-default-gpu-arch.hip clang/test/Driver/hip-device-compile.hip clang/test/Driver/hip-host-cpu-features.hip clang/test/Driver/hip-launch-api.hip clang/test/Driver/hip-link-bc-to-bc.hip clang/test/Driver/hip-link-bundle-archive.hip clang/test/Driver/hip-no-device-libs.hip clang/test/Driver/hip-options.hip clang/test/Driver/hip-output-file-name.hip clang/test/Driver/hip-printf.hip clang/test/Driver/hip-save-temps.hip clang/test/Driver/hip-std.hip clang/test/Driver/hip-syntax-only.hip clang/test/Driver/hip-toolchain-dwarf.hip clang/test/Driver/hip-toolchain-features.hip clang/test/Driver/hip-toolchain-mllvm.hip clang/test/Driver/hip-toolchain-opt.hip clang/test/Driver/lto.cu clang/test/Driver/openmp-offload-gpu.c clang/test/Driver/openmp-offload-infer.c Index: clang/test/Driver/openmp-offload-infer.c === --- clang/test/Driver/openmp-offload-infer.c +++ clang/test/Driver/openmp-offload-infer.c @@ -2,8 +2,8 @@ // REQUIRES: nvptx-registered-target // REQUIRES: amdgpu-registered-target -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ -// RUN: --offload-arch=sm_52 --offload-arch=gfx803 \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ +// RUN: -nogpulib --offload-arch=sm_52 --offload-arch=gfx803 \ // RUN: --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib/libomptarget-amdgpu-gfx803.bc \ // RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc %s 2>&1 \ // RUN: | FileCheck %s @@ -39,9 +39,7 @@ // CHECK-ARCH-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[HOST_BC]]", "[[BINARY]]"], output: "[[HOST_OBJ:.*]]" // CHECK-ARCH-BINDINGS: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: ["[[HOST_OBJ]]"], output: "a.out" -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp \ -// RUN: --offload-arch=sm_70 --offload-arch=gfx908 --offload-arch=native \ -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp \ // RUN: --offload-arch=sm_70 --offload-arch=gfx908 --offload-arch=skylake \ // RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-FAILED Index: clang/test/Driver/openmp-offload-gpu.c === --- clang/test/Driver/openmp-offload-gpu.c +++ clang/test/Driver/openmp-offload-gpu.c @@ -10,33 +10,33 @@ /// ### /// Check -Xopenmp-target uses one of the archs provided when several archs are used. -// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ -// RUN: -Xopenmp-target -march=sm_35 -Xopenmp-target -march=sm_60 %s 2>&1 \ +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -nogpulib -nogpuinc \ +// RUN: -Xopenmp-target -march=sm_52 -Xopenmp-target -march=sm_60 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-ARCHS %s // CHK-FOPENMP-TARGET-ARCHS: ptxas{{.*}}" "--gpu-name" "sm_60" /// ### -/// Check -Xopenmp-target -march=sm_35 works as expected when two triples are present. -// RUN: not %clang -### -fopenmp=libomp \ +/// Check -Xopenmp-target -march=sm_52 works as expected when two triples are present. +// RUN: %clang -### -fopenmp=libomp \ // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu,nvptx64-nvidia-cuda \ -// RUN: -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_35 %s 2>&1 \ +// RUN: -nogpulib -nogpuinc -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_52 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-COMPILATION %s -// CHK-FOPENMP-TARGET-COMPILATION: ptx
[PATCH] D156930: [Clang] Fix Offloading related tests after D156363
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156930/new/ https://reviews.llvm.org/D156930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D156930: [Clang] Fix Offloading related tests after D156363
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! I guess `--rocm-path=` can be used in some places, but `-nogpulib -nogpuinc` is good as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156930/new/ https://reviews.llvm.org/D156930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D156930: [Clang] Fix Offloading related tests after D156363
jhuber6 created this revision. jhuber6 added reviewers: MaskRay, yaxunl, JonChesterfield, tra, jdoerfert, ronlieb, jplehr. Herald added subscribers: mattd, asavonic, ormris, kerbowa, steven_wu, hiraditya, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch fixes failing tests after checking the return code from the driver. This is mostly due to the ROCm libraries not being present during most compilations. Passing `-nogpuinc` should allow us to compile without it for tests that require it. Additionally, some old tests set the architecture of Nvidia tests to `sm_35` which is officially unsupported in CUDA 12+ so it prints an error. We just increase in this case. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156930 Files: clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_35.bc clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_52.bc clang/test/Driver/Inputs/libomptarget/subdir/libomptarget-nvptx-sm_35.bc clang/test/Driver/Inputs/libomptarget/subdir/libomptarget-nvptx-sm_52.bc clang/test/Driver/amdgpu-hip-system-arch.c clang/test/Driver/cuda-bad-arch.cu clang/test/Driver/hip-autolink.hip clang/test/Driver/hip-binding.hip clang/test/Driver/hip-cuid-hash.hip clang/test/Driver/hip-cuid.hip clang/test/Driver/hip-default-gpu-arch.hip clang/test/Driver/hip-device-compile.hip clang/test/Driver/hip-host-cpu-features.hip clang/test/Driver/hip-launch-api.hip clang/test/Driver/hip-link-bc-to-bc.hip clang/test/Driver/hip-link-bundle-archive.hip clang/test/Driver/hip-no-device-libs.hip clang/test/Driver/hip-options.hip clang/test/Driver/hip-output-file-name.hip clang/test/Driver/hip-printf.hip clang/test/Driver/hip-save-temps.hip clang/test/Driver/hip-std.hip clang/test/Driver/hip-syntax-only.hip clang/test/Driver/hip-toolchain-dwarf.hip clang/test/Driver/hip-toolchain-features.hip clang/test/Driver/hip-toolchain-mllvm.hip clang/test/Driver/hip-toolchain-opt.hip clang/test/Driver/lto.cu clang/test/Driver/openmp-offload-gpu.c clang/test/Driver/openmp-offload-infer.c Index: clang/test/Driver/openmp-offload-infer.c === --- clang/test/Driver/openmp-offload-infer.c +++ clang/test/Driver/openmp-offload-infer.c @@ -2,8 +2,8 @@ // REQUIRES: nvptx-registered-target // REQUIRES: amdgpu-registered-target -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ -// RUN: --offload-arch=sm_52 --offload-arch=gfx803 \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ +// RUN: -nogpulib --offload-arch=sm_52 --offload-arch=gfx803 \ // RUN: --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib/libomptarget-amdgpu-gfx803.bc \ // RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc %s 2>&1 \ // RUN: | FileCheck %s @@ -39,9 +39,7 @@ // CHECK-ARCH-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[HOST_BC]]", "[[BINARY]]"], output: "[[HOST_OBJ:.*]]" // CHECK-ARCH-BINDINGS: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: ["[[HOST_OBJ]]"], output: "a.out" -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp \ -// RUN: --offload-arch=sm_70 --offload-arch=gfx908 --offload-arch=native \ -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp \ // RUN: --offload-arch=sm_70 --offload-arch=gfx908 --offload-arch=skylake \ // RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-FAILED Index: clang/test/Driver/openmp-offload-gpu.c === --- clang/test/Driver/openmp-offload-gpu.c +++ clang/test/Driver/openmp-offload-gpu.c @@ -10,33 +10,33 @@ /// ### /// Check -Xopenmp-target uses one of the archs provided when several archs are used. -// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ -// RUN: -Xopenmp-target -march=sm_35 -Xopenmp-target -march=sm_60 %s 2>&1 \ +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -nogpulib -nogpuinc \ +// RUN: -Xopenmp-target -march=sm_52 -Xopenmp-target -march=sm_60 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-ARCHS %s // CHK-FOPENMP-TARGET-ARCHS: ptxas{{.*}}" "--gpu-name" "sm_60" /// ### -/// Check -Xopenmp-target -march=sm_35 works as expected when two triples are present. -// RUN: not %clang -### -fopenmp=libomp \ +/// Check -Xopenmp-target -march=sm_52 works as expected when two triples are present. +// RU