[PATCH] D101265: [OpenMP][CMake] Use in-project clang as CUDA->IR compiler.
Shilei Tian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 25 18:01:30 PDT 2021
tianshilei1992 added a comment.
In D101265#2715702 <https://reviews.llvm.org/D101265#2715702>, @Meinersbur wrote:
> In D101265#2715632 <https://reviews.llvm.org/D101265#2715632>, @tianshilei1992 wrote:
>
>> I didn't get in what scenario we need this patch. Could you please expatiate it?
>
> Not having to provide another sufficiently recent clang/llvm-link binary to pass with `-DLIBOMPTARGET_NVPTX_CUDA_COMPILER`/`-DLIBOMPTARGET_NVPTX_BC_LINKER`.
If OpenMP is built via `LLVM_ENABLE_RUNTIMES`, the two variables you mentioned here are not needed. If OpenMP is built via `LLVM_ENABLE_PROJECTS`, it is *intentionally* to build OpenMP w/o using the clang in recent build.
> D95466 <https://reviews.llvm.org/D95466> seems to have removed the checks for a working Clang at configure-time. If it was still there, this patch would have disabled them since the Clang in the repository with OpenMP would be the most recent and known to support all required features. This also makes it ideal default if available.
The code removed only checked whether a compiler can compile CUDA code. Since we already move to OpenMP style device runtime, it is not needed anymore. The problem here is, we have a requirement of minimum version of clang to work, and we lack that check.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101265/new/
https://reviews.llvm.org/D101265
More information about the llvm-commits
mailing list