[Openmp-commits] [PATCH] D101509: An attempt to abandon omptarget out-of-tree builds.

Wei Wang via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon May 10 19:06:47 PDT 2021


weiwang added a comment.

In D101509#2749559 <https://reviews.llvm.org/D101509#2749559>, @vzakhari wrote:

> @weiwang, I hope you do not mind if I ask you to run some experiments on your side?  Otherwise, I am not sure how to proceed :)
>
> Can you please run the command that fails, pass `-E` to it and check where the header files are coming from?  I.e. run this:
>
>   cd /data/users/wangwei/tp2/llvm-build/platform009/build_nopic/projects/openmp/libomptarget/deviceRTLs/amdgcn && /data/users/wangwei/tp2/llvm-build/platform009/build_nopic/bin/clang-13 -xc++ -c -std=c++14 -ffreestanding -target amdgcn-amd-amdhsa -emit-llvm -Xclang -aux-triple -Xclang x86_64-unknown-linux-gnu -fopenmp -fopenmp-cuda-mode -Xclang -fopenmp-is-device -D__AMDGCN__ -Xclang -target-cpu -Xclang gfx700 -fvisibility=default -Wno-unused-value -nogpulib -O2 -I/home/wangwei/local/llvm-project/openmp/libomptarget/deviceRTLs/amdgcn/src -I/home/wangwei/local/llvm-project/openmp/libomptarget/deviceRTLs/common/include -I/home/wangwei/local/llvm-project/openmp/libomptarget/deviceRTLs /home/wangwei/local/llvm-project/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip -E
>
> Regarding your question "how this change would change anything", can you please check for "Not building AMDGCN device RTL: AOMP not found" message in your "old" builds?  I suppose my change for `find_package` invocation might have caused different behavior in your setup.  Before my change we were looking for `LLVM` in the following paths:
>
>   $ENV{AOMP}
>   $ENV{HOME}/rocm/aomp
>   /opt/rocm/aomp
>   /usr/lib/rocm/aomp
>   ${LIBOMPTARGET_NVPTX_CUDA_COMPILER_DIR}
>   ${LIBOMPTARGET_NVPTX_CUDA_LINKER_DIR}
>   ${CMAKE_CXX_COMPILER_DIR}
>
> Not we look for `LLVM` in all paths that cmake examines by default: https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure

Right. The "old" build cmake outputs "LIBOMPTARGET: Not building AMDGCN device RTL: AOMP not found", and the "new" build cmake outputs "LIBOMPTARGET: Building AMDGCN device RTL. Using clang from in-tree build".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101509/new/

https://reviews.llvm.org/D101509



More information about the Openmp-commits mailing list