[flang-commits] [flang] ae1de3e - [Flang] Remove tests checking now removed 'libc-gpu.a`

Joseph Huber via flang-commits flang-commits at lists.llvm.org
Tue Jul 23 17:41:32 PDT 2024


Author: Joseph Huber
Date: 2024-07-23T19:41:25-05:00
New Revision: ae1de3ea3c2db722bb2b135fe2c29b14b9ae1bcc

URL: https://github.com/llvm/llvm-project/commit/ae1de3ea3c2db722bb2b135fe2c29b14b9ae1bcc
DIFF: https://github.com/llvm/llvm-project/commit/ae1de3ea3c2db722bb2b135fe2c29b14b9ae1bcc.diff

LOG: [Flang] Remove tests checking now removed 'libc-gpu.a`

Summary:
These tests were removed in a previous patch.

The linker wrapper now just extracts the device inputs and forwards them
directly to the device's link job. This is the job that occurs when you
do `clang --target=amdgcn-amd-amdhsa foo.o` or similar. Because this can
handle LTO we no longer do LTO in the linker wrapper. This has some
fallout, because we now require `ld.lld` to be built with a compatible
version, but I think we always expected that.

I made the decision to remove this `libc-gpu.a` library because it was
unnecessary and complicated things. Now I simply have the link job
implicitly link `-lc` if it exists. Users can also now pass
`-Xoffload-linker=amdgcn-amd-amdhsa -lc` or similar to pass it. Because
of this, these tests need to be removed. I forgot that Fortran also had
these.

Added: 
    

Modified: 
    flang/test/Driver/omp-driver-offload.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/omp-driver-offload.f90 b/flang/test/Driver/omp-driver-offload.f90
index 6fb4f4eeeeca1..c7cc3bffb43b5 100644
--- a/flang/test/Driver/omp-driver-offload.f90
+++ b/flang/test/Driver/omp-driver-offload.f90
@@ -175,33 +175,6 @@
 ! RUN: | FileCheck %s --check-prefix=HOST-IR-MISSING
 ! HOST-IR-MISSING: error: provided host compiler IR file 'non-existant-file.bc' is required to generate code for OpenMP target regions but cannot be found
 
-! Check that `-gpulibc` includes the LLVM C libraries for the GPU.
-! RUN:   %flang -### --target=x86_64-unknown-linux-gnu -fopenmp  \
-! RUN:      --offload-arch=sm_52 \
-! RUN:      -gpulibc %s 2>&1 \
-! RUN:   | FileCheck --check-prefix=LIBC-GPU-NVPTX %s
-! LIBC-GPU-NVPTX-DAG: "-lcgpu-nvptx"
-! LIBC-GPU-NVPTX-DAG: "-lmgpu-nvptx"
-
-! RUN:   %flang -### --target=x86_64-unknown-linux-gnu -fopenmp  \
-! RUN:      --offload-arch=sm_52 \
-! RUN:      -nogpulibc %s 2>&1 \
-! RUN:   | FileCheck --check-prefix=NO-LIBC-GPU-NVPTX %s
-! NO-LIBC-GPU-NVPTX-NOT: "-lcgpu-nvptx"
-
-! RUN:   %flang -### --target=x86_64-unknown-linux-gnu -fopenmp  \
-! RUN:      --offload-arch=gfx90a \
-! RUN:      -gpulibc %s 2>&1 \
-! RUN:   | FileCheck --check-prefix=LIBC-GPU-AMDGPU %s
-! LIBC-GPU-AMDGPU-DAG: "-lcgpu-amdgpu"
-! LIBC-GPU-AMDGPU-DAG: "-lmgpu-amdgpu"
-
-! RUN:   %flang -### --target=x86_64-unknown-linux-gnu -fopenmp  \
-! RUN:      --offload-arch=gfx90a \
-! RUN:      -nogpulibc %s 2>&1 \
-! RUN:   | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s
-! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu"
-
 ! RUN:   %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp  \
 ! RUN:      --offload-arch=gfx900 \
 ! RUN:      --rocm-path=%S/Inputs/rocm %s 2>&1 \


        


More information about the flang-commits mailing list