[Openmp-commits] [PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Oct 6 14:57:58 PDT 2020
jhuber6 added a comment.
In D88929#2315378 <https://reviews.llvm.org/D88929#2315378>, @ye-luo wrote:
> FindCUDA has been deprecated.
> Please explore the following feature without directly calling FindCUDA.
> https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1856
Finding architectures using the CUDA language support requires CMake 3.18 as far as I know. LLVM's minimum CMake requirement is 3.13.4 so this method is probably the best I could see. Libomptarget already uses FindCUDA inside `openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake` so I figured it was okay. Alternatively, we could do the detection manually. All this amount to is compiling and running some CUDA code that prints the major and minor version. We could do that manually and try to use the original language support if you think that's a better option, I'm not a CMake guru or anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88929/new/
https://reviews.llvm.org/D88929
More information about the Openmp-commits
mailing list