[all-commits] [llvm/llvm-project] bb7ab2: [OpenMP] Port the OpenMP device runtime to direct ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Feb 5 06:19:18 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb7ab2557c485e004e619570cca7e2204b98a71b
      https://github.com/llvm/llvm-project/commit/bb7ab2557c485e004e619570cca7e2204b98a71b
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2025-02-05 (Wed, 05 Feb 2025)

  Changed paths:
    M offload/DeviceRTL/CMakeLists.txt
    M offload/DeviceRTL/include/Allocator.h
    M offload/DeviceRTL/include/DeviceTypes.h
    M offload/DeviceRTL/include/DeviceUtils.h
    M offload/DeviceRTL/include/Mapping.h
    M offload/DeviceRTL/include/State.h
    M offload/DeviceRTL/include/Synchronization.h
    M offload/DeviceRTL/include/Workshare.h
    M offload/DeviceRTL/src/Allocator.cpp
    M offload/DeviceRTL/src/Configuration.cpp
    M offload/DeviceRTL/src/Debug.cpp
    M offload/DeviceRTL/src/DeviceUtils.cpp
    M offload/DeviceRTL/src/Kernel.cpp
    M offload/DeviceRTL/src/LibC.cpp
    M offload/DeviceRTL/src/Mapping.cpp
    M offload/DeviceRTL/src/Misc.cpp
    M offload/DeviceRTL/src/Parallelism.cpp
    M offload/DeviceRTL/src/Profiling.cpp
    M offload/DeviceRTL/src/Reduction.cpp
    M offload/DeviceRTL/src/State.cpp
    M offload/DeviceRTL/src/Synchronization.cpp
    M offload/DeviceRTL/src/Tasking.cpp
    M offload/DeviceRTL/src/Workshare.cpp

  Log Message:
  -----------
  [OpenMP] Port the OpenMP device runtime to direct C++ compilation (#123673)

Summary:
This removes the use of OpenMP offloading to build the device runtime.
The main benefit here is that we no longer need to rely on offloading
semantics to build a device only runtime. Things like variants are now
no longer needed and can just be simple if-defs. In the future, I will
remove most of the special handling here and fold it into calls to the
`<gpuintrin.h>` functions instead. Additionally I will rework the
compilation to make this a separate runtime.

The current plan is to have this, but make including OpenMP and
offloading either automatically add it, or print a warning if it's
missing. This will allow us to use a normal CMake workflow and delete
all the weird 'lets pull the clang binary out of the build' business.
```
-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=offload
-DLLVM_RUNTIME_TARGETS=amdgcn-amd-amdhsa
```

After that, linking the OpenMP device runtime will be `-Xoffload-linker
-lomp`. I.e. no more fat binary business.

Only look at the most recent commit since this includes the two
dependencies
(fix to AMDGPUEmitPrintfBinding and the PointerToMember bug).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list