[llvm] [OpenMP] Remove dependency on LLVM include directory from DeviceRTL (PR #136359)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 08:52:46 PDT 2025


jhuber6 wrote:

> In the past if I remember correctly, we need more values from LLVM headers for AMDGPU, such as the wavefront size. It seems like as we evolve recently, we only need one value. It might be "overkill" to include it.
> 
> If we move it back to `openmp/`, it will not be built by default right? A lot of `libomp` users build `libomp` out of tree. With that being said, even if we move it back, we can probably still have it depend on LLVM headers if the device runtime is built?

The idea is that it will build this version if you compile with the respective GPU triple, and the CPU library otherwise. So, if you enter in `CMAKE_<LANG>_COMPILER_TARGET=amdgcn-amd-amdhsa` for your standalone build, you get this. I *could* keep the include, but this just feels much cleaner since it's a single constant that is unlikely to ever change, and there's a comment for it.

https://github.com/llvm/llvm-project/pull/136359


More information about the llvm-commits mailing list