This patch prefixes omp outlined helpers and reduction funcs
with the original function's name.
Details
Diff Detail
Unit Tests
Event Timeline
I had to cut context lines to 2 to fit in the 8MB limit. It looks like there are a few files that absorb way more line diff than makes sense, but I haven't investigated way. One particular offender is clang/test/OpenMP/nvptx_SPMD_codegen.cpp, which loses 23KLOC. I think some of the NVPTX files are not idempotent under update_cc_test_checks in master, but I haven't checked again to make sure.
Generally, I think this is fine. I left comments below.
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
1261 | why the empty string? | |
clang/test/OpenMP/declare_target_codegen_globalization.cpp | ||
65 | This might be easier to debug than the SPMD test. For some reason the function is gone, which is bad. My money is on the trailing $ which prevents us from matching it as a function in the update test script. That said, I really doubt we want that $ anyway. |
Assuming this passes all tests, incl. runtime tests in openmp/libomptarget/tests, LGTM.
Minor fix to the clang/CodeGen/ppc64le-varargs-f128.c test.
@jdoerfert Does the PR CI run these, or are there build bots that cover the different target-offloading variants? Can I somehow check this prior to merging without having all hardware variants on-hand?
There is a buildbot for AMDGPU and the x86 fallback. Not sure about the status of the NVPTX openmp offloading buildbot.
What hardware do you have access to? I could potentially give it a try on AMDGPU prior to merging.
I don't have non-cumbersome access to GPU targets at the moment.
I have run the following locally with the patch, and it seems to pass:
> ninja check-libomptarget [0/1] Running libomptarget tests Testing Time: 9.69s Unsupported: 57 Passed : 205
This is with the following parts enabled:
-- LIBOMPTARGET: Building offloading runtime library libomptarget. -- LIBOMPTARGET: Not building aarch64 offloading plugin: machine not found in the system. -- LIBOMPTARGET: Building AMDGPU plugin for dlopened libhsa -- LIBOMPTARGET: Not generating AMDGPU tests, no supported devices detected. Use 'LIBOMPTARGET_FORCE_AMDGPU_TESTS' to override. -- LIBOMPTARGET: Building CUDA offloading plugin. -- LIBOMPTARGET: Building CUDA plugin for dlopened libcuda -- LIBOMPTARGET: Not generating NVIDIA tests, no supported devices detected. Use 'LIBOMPTARGET_FORCE_NVIDIA_TESTS' to override. -- LIBOMPTARGET: Not building PPC64 offloading plugin: machine not found in the system. -- LIBOMPTARGET: Not building PPC64le offloading plugin: machine not found in the system. -- LIBOMPTARGET: Not building nec-aurora plugin: libveo or libveosinfo not found. -- LIBOMPTARGET: Building x86_64 offloading plugin. -- LIBOMPTARGET: Not building aarch64 NextGen offloading plugin: machine not found in the system. -- LIBOMPTARGET: Building AMDGPU NextGen plugin for dlopened libhsa -- LIBOMPTARGET: Building CUDA NextGen offloading plugin. -- LIBOMPTARGET: Building CUDA plugin for dlopened libcuda -- LIBOMPTARGET: Not building PPC64 NextGen offloading plugin: machine not found in the system. -- LIBOMPTARGET: Not building PPC64le NextGen offloading plugin: machine not found in the system. -- LIBOMPTARGET: Building x86_64 NextGen offloading plugin. -- LIBOMPTARGET: Building DeviceRTL. Using clang from in-tree build -- LIBOMPTARGET: Building the llvm-omp-device-info tool -- LIBOMPTARGET: Building the llvm-omp-kernel-replay tool
Tested on AMDGPU (gfx90a)
-- OpenMP tools dir in libomptarget: /home/janplehr/git/trunk17.0/build/llvm-project/runtimes/runtimes-bins/openmp/runtime/src -- LIBOMPTARGET: Building offloading runtime library libomptarget. -- LIBOMPTARGET: Not building aarch64 offloading plugin: machine not found in the system. -- LIBOMPTARGET: Building AMDGPU plugin linked against libhsa -- LIBOMPTARGET: Not building CUDA offloading plugin: LIBOMPTARGET_BUILD_CUDA_PLUGIN is false -- LIBOMPTARGET: Not building PPC64 offloading plugin: machine not found in the system. -- LIBOMPTARGET: Not building PPC64le offloading plugin: machine not found in the system. -- LIBOMPTARGET: Not building nec-aurora plugin: libveo or libveosinfo not found. -- LIBOMPTARGET: Building x86_64 offloading plugin. -- LIBOMPTARGET: Not building aarch64 NextGen offloading plugin: machine not found in the system. -- LIBOMPTARGET: Building AMDGPU NextGen plugin linked against libhsa -- LIBOMPTARGET: Not building CUDA NextGen offloading plugin: LIBOMPTARGET_BUILD_CUDA_PLUGIN is false -- LIBOMPTARGET: Not building PPC64 NextGen offloading plugin: machine not found in the system. -- LIBOMPTARGET: Not building PPC64le NextGen offloading plugin: machine not found in the system. -- LIBOMPTARGET: Building x86_64 NextGen offloading plugin.
Before
Testing Time: 44.63s
Unsupported: 123 Passed : 657
After
Testing Time: 38.74s
Unsupported: 123 Passed : 657
I'm seeing some test failures in our CI:
Clang :: OpenMP/parallel_masked.cpp
Clang :: OpenMP/parallel_masked_target.cpp
If this will be hard to fix, can you revert until a fix is ready?
why the empty string?